Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Converting date formats
Message
De
25/01/2007 23:27:49
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
 
 
À
25/01/2007 21:26:48
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:
01189449
Vues:
14
>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.

back to same old

the first online autobiography, unfinished by design
What, me reckless? I'm full of recks!
Balkans, eh? Count them.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform