Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Date String to Date
Message
 
To
19/10/1997 03:51:03
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00054810
Message ID:
00055426
Views:
29
>>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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform