datetime.formatDate
This function displays the date according to the specified format. The format uses MM(month), DD(day), and YYYY(year) and they are not case-sensitive.
Syntax
datetime.formatDate(date, format)
Arguments
Argument |
Type |
Description |
---|---|---|
date |
datetime |
Date and time to be formatted. |
format |
string |
Format to be used for the date and time. |
Returns
Type |
Description |
---|---|
string |
Date and time in the specified format. |
Examples
The function datetime.formatDate("02/08/2017", "dd-MM-yyyy")
returns 08-02-2017
.