Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date constant problem
Message
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00096328
Message ID:
00096414
Views:
13
Fred,

Date constants in code are cast in the SET DATE mode in effect at compile time, which can cause some screwy things if the runtime uses a different SET DATE.

>Try this:
>
> SET DATE TO AMERICAN
> dVal = {01/01/1998}
>
>
>What you get is an empty date if this code is run in a .PRG, but it works fine from the command window. I've already done a workaround, using dVal = CTOD('01/01/1998'), but this seems strange. A generic point of interest: if you place a MESSAGEBOX call between the SET DATE TO and the use of the date constant, it works fine!
df (was a 10 time MVP)

df FoxPro website
FoxPro Wiki site online, editable knowledgebase
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform