How to insert a dynamic date into a mailing Print

  • dynamic date, member specific, content, footer
  • 0

Question: 
How to insert a dynamic date into a mailing?

Solution:
It may be desired to include a member specific date in the mailing content. For example, the footer of the content could include the date that the particular member joined the list.

This is achieved using the "timeformat" mail merge tag.
The syntax is:

%%timeformat tablename.datefield "formatstring"%%
 


The date joined example would be:

%%timeformat members_.Datejoined_%%
and would print: Fri Mar 01 15:40:00 PDT 2015
 

A variation on the date joined formatting would be:

%%timeformat members_.DateJoined_ "%m/%d/%y %H:%M:%S"%%
and would print: 03/01/02 15:40:00
 

The web documentation has a complete listing of all formatting codes:
Version 9.3x
http://www.lyris.com/help/lm_help/9.3/Content/How_To_Format_Dates.html
Version 10.2x
http://www.lyris.com/help/lm_help/10.2/Content/How_To_Format_Dates.html

Date joined is only one example. Any date field, including custom demographics, can be used with this function.

The function can also report the current system time.

%%return [clock format [clock seconds] -format "%A %b %d, %Y"]%%
would print the date when the particular message is sent, based on the system time.
 

Was this answer helpful?

« Back