General information
Category:
Coding, syntax & commands
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
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only