Lyris User's Guide
[previous] [next] [contents]
Date Field
Table of Contents
Lyris Email Commands
Web Interface for Users
Server Administrator
Site Administrator
List Administrator
Other Topics
Security Considerations
Security Issues Relating to Members
Lyris Mail Merge
Recipient Fields
Member Fields
List fields
Site fields
Email Address fields
Incoming Mail fields
Date Field
The Lyris command line
Modifying lyris.plc
Add-On Packages
Installing and Upgrading
Frequently Asked Questions

Date Field

You can use the current date and time as a mail merge field. To do this, use the "date:" mail merge code, followed by the formatting characters you want to use, to display the date and/or time in exactly the manner you want.

For example, the code:


will print the date and time in the default format.

Another example:

    $subst('date:%A, %B %d, %Y')

will display the Weekday, Month, day of month and year, in this format:

    Monday, June 14, 1997

Any characters which are not date formatting codes are displayed as-is. For example, in the above example, the commas are displayed as indicated in the formatting string.

Here is a complete list of date formatting codes:

%a day of week, using locale's abbreviated weekday names
%A day of week, using locale's full weekday names
%b month, using locale's abbreviated month names
%B month, using locale's full month names
%c date and time as %x %x
%C century, 1992 becomes 19 (-47 to 327)
%d two-digit day of month (01 to 31)
%D date as %m/%d/%y
%e two-digit day of month, single digits are preceded by a blank (1 to 31)
%f if year < 1000, then "%s %P", else "%s"
%H two-digit hour (00 to 23)
%I two-digit hour (01 to 12)
%j three-digit day number of year (001 to 366)
%k two-digit hour, single digits are preceded by a blank (0 to 23)
%l two-digit hour, single digits are preceded by a blank (1 to 12)
%m month number (01 to 12)
%M minute (00 to 59)
%n newline, same as \n
%p locale's equivalent of A.M. or P.M., whichever is appropriate
%P A.D. or B.C.
%r time as %I:%M:%S %p
%s positive year, -4 becomes 4 (1 to 32766)
%S seconds (00 to 59)
%t tab, same as \t
%T time as %H:%M:%S
%U week number of year, Sunday is the first day of the week (00 to 53)
%w day of week; Sunday is day 0 (0 to 6)
%W week number of year, Monday is the first day of the week (00 to 53)
%x date, using locales' date format
%X time, using locale's time format
%y year within century (00 to 99)
%Y year, including century (-4713 to 32766)
%Z time zone abbreviation

Other pages which link to this page:
  • Lyris Mail Merge
  • New in Version 2.5
  • Page 406 of 556