Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
DATE BUG ????
Message
From
10/02/2000 08:04:39
Amit Abhangrao
Charmi Software Exports
Mumbai, India
 
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
00329861
Message ID:
00329923
Views:
16
Hi Jim Booth,

Try to create an exe file and run the program. You will find that one of the date result is showing wrong.

Regards

Amit






>Mallari,
>
>This is NOT a bug. It is a mistunderstanding of what is happening. Date literals are evaluated based on the date setting at the time the code is COMPILED not on the runtime setting. This makes perfect sense since the compiling is happening at a different time.
>
>If the SET Date setting is AMERICAN when you compile the code then a bogus American format for a date will result in an empty date value. The SET DATE command in the code DOES NOT EXECUTE during the compilation process, it executes when the code is run and by then the literal has already been converted to a date value based on the SET DATE setting in effect when the code was compiled.
>
>You can avoid the problem altogether by using the StrictDate format for all date literals, {^YYYY/MM/DD} which is independent of any SET DATE setting. I would advise setting the SET STRICTDATE setting to at least 1 so the compiler will scream at you if you ever forget to use the strictdate format for date literals.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform