>When accessing MSSQL datetime field with null values, VFP returns .null. but VB returns "12:00:00 AM" (using ADO). I guess this is more ADO behavior than VB?
>
>Thus, if I want to display the returned value on my VB form, I have to check this and code like this:
>
>If RS.Fields("MyDateField") = "12:00:00 AM"
> txtShipDate.Value = ""
>Else
> txtShipDate.Value = RS.Fields("MyDateField").Value
>End If
>
>There has to be a better way, isn't there? What's a good technique working with null datetime value? Also, is using MaskedEdit control for displaying/getting date data a "good" technique? TIA.
Hi John,
In VBA you can use function DateValue which gives the date part of the datetime value. Check Date part of the datetime value.
HTH, Igor
Igor Gelin
Database Developer