Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Is Date String A Valid Date?
Message
 
To
06/07/2001 03:26:05
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00526801
Message ID:
00527330
Views:
31
Gary,

To extend Jill's idea a little (so it doesn't rely on SET("DATE") etc), you could use
lcDate = '{^2001-06-31}'
? empty(eval(lcDate))  && returns .T.
Cheers,

Andrew

>Fred:
>
>>? EMPTY({^2001/06/31})
>
>The above on my system generates an error "Date/Datetime evaluated to an invalid date". I don't know whether this happens on your system? However, if this is the behaviour you expected, Jill's solution provides a boolean return value for valid date/invalid date without the need for error trapping.
>
>Thanks.


If we were to introduce Visual FoxBase+, would we be able to work from the dotNet Prompt?


From Top 22 Developer Responses to defects in Software
2. "It’s not a bug, it’s a feature."
1. "I thought I fixed that."


All my FoxTalk and other articles are available on my web site.


Unless specifically identified otherwise, anthing posted here is purely my opinion and may or may not reflect the policies or practices of Microsoft.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform