Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date constant problem
Message
From
01/05/1998 21:21:22
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00096328
Message ID:
00096457
Views:
14
>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 guess when FoxPro starts up, you don't have the date format set to DMY but to ANSI perhaps (YMD).
That's all I can think of at the moment.

Because the SET DATE TO has no effect on the COMPILE time setting of SET DATE which is what determines the value that will be placed in the variable.

Barbara and I wrote about this in FoxTalk's KitBox column.


It's something that I run into with people's samples, having to SET DATE AMERICAN before I can compile their code. Or to edit any date constant in the code to DMY format form MDY.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform