Formatting and handling dates

Use these system functions to get the date and set the date format.

Examples Returns
system.date.format("ddd MMM Do, YYYY") Tue Jul 31st, 2018
system.date.locale("es").format("ddd MMM Do, YYYY") mar. jul. 31ยบ, 2018
system.formatDate() July 31st 2018

This is the default format (ddd MMM Do, YYYY)

system.formatDate(system.now, "D/MM/YY") 31/07/18
system.month July
system.day Tuesday
system.year 2018
For example entering the following in Send to user of a message:
Today is {system.formatDate(system.now, "D/MM/YY")}

displays this to the user:

Today is 4/02/19