Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Date String to Date
Message
 
À
19/10/1997 03:51:03
Dragan Nedeljkovich (En ligne)
Now officially retired
Zrenjanin, Serbia
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00054810
Message ID:
00055426
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?

Thanks, Dragan. That's exactly what I did except I used 'American' instead of 'ymd'. Doesn't matter, as long as you re-set it to the user's system.

Also, like Vlad, I'd like to know what RHN is?

Barbara
Barbara Paltiel, Paltiel Inc.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform