Conditions to DateTime values

Feb 5 2018 4:55 PM
Hi
 
I am using bootstrap datepicker to select date ranges in the view. So now I have to check for two conditions .
 
1. when date ranges are given the grid should display the values that belong to that particular dates upon click of search button
 
2. when the date ranges are left empty, then grid gives all the values irespective of date ranges. 
 
My question here is --- is there any condition that checks both null and values given to datetime field..
 
here is the how I am declaring date fields
 
DateTime StartDate = new DateTime();
DateTime EndDate = new DateTime();
 
and its not considering the values which I am selecting in UI and giving the default date to 1/1/0001.
 
Please answer my question ASAP.Thanks In Advance

Answers (2)