Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting date formats
Message
De
26/01/2007 02:21:04
 
 
À
25/01/2007 23:27:49
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Versions des environnements
Visual FoxPro:
VFP 6
Divers
Thread ID:
01189445
Message ID:
01189460
Vues:
10
>>How do you convert this kind of date format 01-AUG-99 to 07/01/1999?
>
>Subtract a month?
>
>Kidding aside... something like this:
>
>
lparameters tcDate
>lnDay=val(getwordnum(tcDate,1,"-/."))
>lnYear=val(getwordnum(tcDate,3,"-/."))
>lnMonth=int(atc(getwordnum(tcDate,2,"-/."), " JAN FEB MAR APR MAY JUN JUL AUG SEP OCT NOV DEC")/4)+1
>return date(lnyear, lnmonth, lnday)
>
>...more or less. The month calculation may nead some tweaking before it works right.

This will not work in VFP 6 because it misses the getwordnum() function. Evelyn, it's about time to upgrade, you will be much more productive with VFP 9.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform