The Now Function

Now() inserts the current date and/or time into the document. It can be formatted in the same way as FormatDate.

 

Command structure:

«Now("d MMMM, yyyy")»

 

Examples of usage:

«Now("d MMMM, yyyy")» yields “2 September, 2020”
«Now("MMMM o yyyy")» yields ‘September 2nd 2020’
«Now("yyyy/MM/dd HH:mm:ss.fff")» yields ‘2020/09/02 17:05:23.010’ which is exactly the same as «Now()»



A twelve-hour time with AM or PM is achieved by:

«Now("yyyy/MM/dd hh:mm:ss.fff tt")»

which yields the above time as ‘2020/09/02 05:05:23.010 PM’.



The date can be rendered in a different language:

«Now("d MMMM, yyyy", "fr")»
On 1st January 2021 this would yield ‘1 janvier, 2021’.

On 1st January 2008 this would yield ‘1 Januarie, 2008’.

 

 

Note:

The value inserted into the assembled document is the date/time on which the template was run. This value will not be updated if that assembled document is re-opened on a subsequent date.

 

Related articles:

FormatDate

Format the date in the old style

Table of Contents