I just found that my SqlDateTime.MinValue is different on different machines.
Sometimes it = DateTime (1953, 1, 1, 0, 0, 0);
but on other machines it is = DateTime (1753, 1, 1, 0, 0, 0);
How can it be? OS on both machines - WinXP SP2.
Edit:
My code was like this:
DateTime date;
...
if (date == SqlDateTime.MinValue)
{
return "(any)";
}
else
{
return date.ToString();
}
This code should never be returned on January 1, 1753, but it was (on some machines). Minutes and seconds of the date are not used by my code and should always remain the default values.
source
share