I think the value is actually stored as null, but if you do an explicit conversion from SqlDateTime to DateTime, the value gets converted to "1/1/1900 00:00:00". I tried this, and that is what appears to be happening:
DateTime dateTime;
SqlDateTime sqlDateTime;
sqlDateTime = SqlDateTime.Null;
dateTime = (DateTime)sqlDateTime;
I was unable to do an implicit conversion, but maybe that is what is going on with your and Kevin's code. Are you using C# or VB?
>You *do* realize that System.Data.SqlTypes.SqlDateTime.Null is actually "1/1/1900 00:00:00", right?
>
>~~Bonnie
>
>
>
>>I had to Google it to find the answer, and after looking at it, I think I am going to leave it the way it was. Serves me right for trying to be consistent.
>>
>>I do appreciate you and Kevin looking at it. Sometimes (ok, most of the time) .NET makes me feel stupid.
>>
>>>Good going, Chris!! I guess my head wasn't screwed on correctly this afternoon ... dunno how I missed this! You may give Kevin and I 50 lashes!! <g>
>>>
>>>~~Bonnie
Chris McCandless
Red Sky Software