>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?