2018.1

Table Of Contents
Tip
If you are looking to add a date that originates from a record set, to a template, see: "Variable Data"
on page669. To insert a date you could use either the drag and drop method or the Text Script
Wizard; the latter lets you set the date/time format.
Changing the date
Once inserted, a date can be modified directly in the template (if it does not update
automatically) or through the date script (if it does update automatically). To modify the date in
the script:
1.
Double-click the date script in the Scripts pane.
2. Between the round brackets after Date, enter the desired date in the following order:year,
month, day, and optionally hours, minutes, seconds, milliseconds (see
http://www.w3schools.com/js/js_dates.asp and https://developer.mozilla.org/en-
US/docs/Web/JavaScript/Reference/Global_Objects/Date.) When the time is omitted, it
defaults to 12:00:00 AM.
Formatting an automatically updating date
The script added to automatically update the date uses the short date format. To change this:
1.
Double-click the date script in the Scripts pane.
2. Delete the first line of the script.
3. On the second line, delete what comes after format and change format to
formatter (see "formatter" on page1059).
4.
Now type a dot after formatter, press Ctrl + space and choose one of the functions to
format a date and time; see "Creating a Date object from a string" on page1064.
Note
The Locale, set in the Edit > Locale dialog, has an influence on the formatting of a date. The
Locale can be the system's locale, a specific locale, or it can depend on the value of a data field; see
"Locale" on page654.
Page 589