Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Type a string date
Message
 
 
À
14/01/2011 19:13:27
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 9 SP2
OS:
Windows Server 2008
Divers
Thread ID:
01496168
Message ID:
01496302
Vues:
41
>>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform