SmartDate with Nullable DateTime

SmartDate with Nullable DateTime

Old forum URL: forums.lhotka.net/forums/t/11903.aspx


Brad Rem posted on Tuesday, March 26, 2013

I'm unsure why the following two statements return different results. I would expect that the second SmartDate constructor would return the same result as the first. Can somebody set me straight?

// myDate1.Date = 12/31/9999 11:59:59 PM
var myDate1 = new SmartDate((string)null, false);   

// myDate2.Date = 1/1/0001 12:00:00 AM
var myDate2 = new SmartDate((DateTime?)null, false);

Copyright (c) Marimer LLC