Showing posts with label null. Show all posts
Showing posts with label null. Show all posts

Monday, March 28, 2016

How to test if DateTime is null

Pretty straightforward you need to remember that the .Net stack gives any time date variable a min value by default.  You just need to test for the presence of that min value.


if(test.lastupdate == DateTime.MinValue)
{
//your condition
}