When defining a letter templates and you use a merge field that contains a date such as
<$contact.createDate$>, you get the following kind of date description: 2006-04-11 00:00:00 -0500. If you want to format the date to suit your needs, you simply append one key such as mediumDate. Your merge field will look like
<$contact.createDate.mediumDate$>. The output would then look like this: Apr 11, 2006. The available options are listed below.
If you do not like any or our formats, you can create your own by combining the basic elements.
<$contact.createDate.fullYear$>,
<$contact.createDate.fullMonth$>Here are the list of options that apply to dates only. They are pretty self explanatory.
- shortDate
- shortDateTime;
- shortTime;
- longDate;
- longDateTime;
- mediumDateTime;
- mediumDate;
- shortMonthDayYear;
- fullMonthDayYear;
- monthDayYear;
- monthDayShortYear;
- dayShortMonthYear;
- dayFullMonthYear;
- dayMonthYear;
- dayMonthShortYear;
- time;
- fullTime;
- militaryTime;
- fullMilitaryTime;
- day;
- weekDay;
- yearDay;
- month;
- shortMonth;
- fullMonth;
- fullYear;
- shortYear;
The following are date formats that are picked up from your choices in the International pane of the System Preferences. The behavior is sightly different depending on whether you are on Panther (10.3) or Tiger (10.4).
- preferredDateFormat;
- preferredMediumDateFormat;
- preferredLongDateFormat;
- preferredLongDateTimeFormat;
- preferredTimeFormat;
- preferredDateTimeFormat;
NOTE: These date keys are available to you in the Legacy Report System (HTML, RTF, TXT), the Business Card Views (HTML) and the HUD Templates (HTML).
For the technically minded. The options mentioned above are defined as Methods in Category of NSCalendarDate and return NSStrings.