Search  
   
Browse by Category
Marketcircle KB .: Daylite 3.x .: Merging .: How do I format a date field in a letter template?

How do I format a date field in a letter template?

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.


How helpful was this article to you?

Related Articles

article Why does'nt Daylite respect the currency format, alphabetic sorting, and date format that I have setup in my System Preferences?
If you notice that Daylite does...

  4-20-2007    Views: 5659   
article How do I change the pages margins in a Letter or Letter Template?
Open the Letter or Letter Template....

  4-12-2006    Views: 3711   
article When attempting to preview a Report Template, I receive a error message?
When attempting to preview a report...

  7-4-2006    Views: 6833   
article What are the available merge keys for letter templates?
The following document lists...

(No rating)  4-7-2008    Views: 1949   
article Additional Organization Letter Template Merge Keys
We have the following document...

  7-4-2006    Views: 5289   
article How do I place email addresses in the BCC field rather than the TO field when using the Write Email feature of Daylite?
Note that the 'Write Email' feature...

  9-17-2006    Views: 4401   
article Creating an industry specific database from a database template
The industry specific database...

(No rating)  1-28-2008    Views: 2424