Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Type a string date
Message
 
 
To
14/01/2011 19:13:27
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Environment versions
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Miscellaneous
Thread ID:
01496168
Message ID:
01496301
Views:
116
>>yes ! you are right..!
>>
>>but naomi give a solution with more security...
>
>Yes, less unstable than a few others, because there's no stable one.
>
>You may only look for a certain string within your expression, depending on the Set Date, and here's your worst enemy:
>
>
SET DATE LONG
>?DATE()
>15. januar 2011
>?DTOC(DATETIME())
>15. januar 2011; 1:07:54
>
>In a case like this, counting characters gets you nowhere, because we have months from 3 to 8 characters long, plus a space around the month. In other date formats it may look different. The semicolon after the year is not guaranteed in all locales etc etc. So any solution like those offered may work only if you know exactly what your Set Date will be for the date or datetime string you are checking. If you don't, all bets are off.
>
>Are you sure you have irretrievably lost the variable which was transformed into this string? If you didn't, that variable knew what it was, a D or a T.

There is extra parameter in dtoc or ttoc functions that guarantee the same string everytime.
If it's not broken, fix it until it is.


My Blog
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform