Why not just use dtos(...) instead of dtoc(...)? That way your string is always in the same order, no matter WHAT date format you're using.
Of course, it's a moot point since Vlad Tatavu & Jim Booth have come up with slightly faster methods. 1 sec. in 500,000 repetitions will REALLY save the user's a lot of time, Vlad :-)
Barbara
>That matters A LOT, especially when you let the user to choose the date format.
>There are 4 formats with the year first in FoxPro: ANSI, JAPAN, TAIWAN, YMD. Also, this is almost a standard here (as far as I can I say). :)
>
>Vlad
>
>
>>Hi Paul!
>>
>>I think that it doesn't matter ;), but I can't recall the date format where
>>year is on the first place...
>>
>>Have a happy day
>>Vladimir Shevchenko
>>
>>> This depends on SET DATE (and SET CENTURY if the year is on the first
>>place
>>> in SET DATE). :(