Tech Tip: Formatting Date to String Results
PRODUCT: 4D | VERSION: 11.3 | PLATFORM: Mac
Published On: December 23, 2008
Date expressions are translated to strings using the default format specified in the system. Therefore the formats using System dates can be modified to return string results using the Mac OS X date formats.
For example:
C_STRING(255;$Date_To_String_t) $Date_To_String_t:=String(Current date;System date abbreviated ) |
Result
$Date_To_String_t:="Dec 8, 2008"
To Obtain
$Date_To_String_t:="Mon, Dec 8, 2008"
We need to change the date format in the OS running 4D.
Select International in your System Preferences.
To change the date format:
- Click on Formats.
- Under Dates click on Customize.
- Click on Show and Select Medium.
- Drag the Day of the Week before the Month, and select Sat for Saturday, add a comma and a space after Sat.
When you go back to Dates the third date from the top should look like this: