Yet another use case for $translate: date conversion
Have you tried $Translate for date conversion?
USER>write $Translate("Dd.Mm.WwYy","WwYy-Mm-Dd","2015-08-02")
02.08.2015
Stolen from Russian forum and Alexander Koblov.
Discussion (1)0
Comments
Excellent. It reminded me of the Translate example from my REXX programmer days, which I slightly reworked for Caché:
This example shows how to use the $TRANSLATE function to reorder the characters in a string. In the example, the last character of any four-character string specified as the third argument would be moved to the beginning of the string:
USER>write $Translate("4123","1234","abcd")
dabc