Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date constant problem
Message
From
01/05/1998 14:00:38
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00096328
Message ID:
00096338
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'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!
>>>
>>>Fred Taylor
>>Better try "set date to mdy" instead of american.
>>cetin
>
>
>I just tied this again with your MDY suggestion and it works! However, now so does SET DATE TO AMERICAN. Hmm, not the first time I've run into strange behavior with VFP.
>
>Fred
In fact now american is slave of mdy and works for that reason. Try :
set date to dmy
set date to american
I think it would fail. I think it's related with use system defaults setting.
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform