Date to String | DATE_TO_STRING

Syntax

DATE_TO_STRING( [value], [formatMask] )

Parameters

value
The date value that will be converted to a string. If the value is not a DATE object, it will be converted to one with the DATE method.

formatMask optional
A string describing the format for the conversion. Valid formats include:

Return Value

The result of the input being formatted to a string value.

Description

Converts a date to a string representation according to a specified format.

Examples

DATE_TO_STRING(DATE("2017-08-30T17:36:23.077Z"), "UTC:ddd mmm dd yyyy HH:MM:ss") # outputs "Wed Aug 30 2017 17:36:23"
DATE_TO_STRING(DATE("2017-08-30T17:36:23.077Z"), "UTC:mm/dd/yyyy") # outputs "08/30/2017"