formatDate()
Converts a given value of type Date into a String.
Syntax
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
Sample usage
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.
Supported data types
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. |


Updated 03 May 2023
Did this page help you?
Yes
No