Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Why?????
Message
From
19/06/2003 09:01:00
 
General information
Forum:
Visual FoxPro
Category:
Other
Title:
Miscellaneous
Thread ID:
00801657
Message ID:
00801701
Views:
25
>In VFP 6.0 SP5 when I type in textbox "12.12.0020" as a date (Date format is German) nothing happensbut when I recompiled my application with VFP 8.0 VFP raises error 2034 "Date/datetime evaluated to an invalid value.". I try to catch this error in class - no result. I try to put some code in VALID event-same result. My question is why that is happend, and how to catch this invalid input?
>
>TIA

My guess is that it's a bug (VFP8). According to the help, Date(nYear,nMonth,nDay) should be valid for years from 100 to 9999, but in the command window try typing:
? Date(1600,12,31)
It errors out. Now type:
? Date(1601,12,31)
It's Ok.

Now, what is really weird, is this:
? Year(Date(1600,12,31))
1600
Alan
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform