KNOWLEDGE BASE
Log In    |    Knowledge Base    |    4D Home
Tech Tip: 'MM/DD/YYYY' or 'DD/MM/YYYY'?
PRODUCT: 4D | VERSION: 2004 | PLATFORM: Mac & Win
Published On: August 14, 2006

The following code returns a string: 'MM/DD/YYYY' or 'DD/MM/YYYY', depending on the local system settings.

DateFormat:=Replace string(Replace string(Replace string(String(!05/06/2007!;MM DD YYYY Forced);"05";"MM");"06";"DD");"2007";"YYYY")

Developers can then use the DateFormat string to check if the local system places a month or a date first. This is helpful when localizing an application.