Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Empty Date Time Field
Message
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00119110
Message ID:
00119113
Views:
22
>How do I check a Date Time field for empty? Whenever I try to use/ read a Date Time field that has nothing in it I get a data type mismatch error.
>
>I assume the data type is a T for Date-Time.
>
>I tried NULL and I tried looking for " ", but no luck.
>
>I thought about converting the Date and looking for zero.
>
>Thanks for the help.

If a field is of type DateTime, empty(FieldName) works, at least it does for me in VFP 5. Or are you trying to test the value of a textbox? There is a function, TTOC(), to convert a date-time to character. And a CTOC() function to convert from character to Date-Time. These should help. And yes, T is type for DateTime fields.
Mark McCasland
Midlothian, TX USA
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform