5min
formatDate()
Converts a given value of type Date into a String.
formatDate(date[, format][, locale])
- date - the Number value to be rounded
- format - the format of the Date, eg. 'mm-dd-yyyy'
- locale -
- Return type: String
formatDate(startDate) returns the value of startDate as a String.
formatDate(startDate, 'mm-dd-yyyy') returns the value of startDate as a String in the specified format.
Input type | Return type | Logic |
Date | String | If a Date value is passed, it's value will returned as a String. |
Unsupported data types | Null | Unsupported data types return Null. |