Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date String to Date
Message
De
19/10/1997 03:51:03
Dragan Nedeljkovich
Now officially retired
Zrenjanin, Serbia
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00054810
Message ID:
00055346
Vues:
34
>Unfortunately, we need to use those dates AS dates, and I can't find a >simple way to return the '19971031' format to a date variable in the same >date format as the user's Windows. I need a function that reverses dtos(). >I've written a work-around by changing date format to AMERICAN and then >re-setting it to the user's preference, but there HAS to be a simpler, more >elegant way. > >Different users on the same site may use different date formats :-( > >Ideas? Or have I missed an obvious function when I looked in Help? > >TIA >Barbara Lpara dtos_lc local setd_lc, setc_lc, date_ld setd_lc=set("date") *setc_lc=set("cent") *set cent on set date ymd date_ld=ctod(transform(dtos_lc,"@R 9999.99.99")) set date (setd_lc) *set cent &setc_lc return date_ld It's really only the long line that counts, but saving & restoring the settings makes it long. Anyway, for this one you must preserve the settings, or we've missed the point. The century setting is commented out - works OK without it. Hey, am I the only one of the RHN club here?

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