Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Panel
bgColorwhite

DATE


This function converts a value of another data type into a date data type


Syntax

Code Block
DATE(string, [format])
DATE(dateTime)


Inputs

  • value - The value of the data type that is converted to date. 

  • format (optional) - The format used for conversion. Format must be enclosed by quotes, e.g. "yyyy-MM-dd". For more info on specifying date format patterns, please see Date and time patterns


Default formats

For all conversion functions that use a string as parameter, the [format] describes the format in which the input string value parameter is in. When not specifying a format, by default this format is used: 

  • string to date - yyyy-MM-dd. 


Return type

  • date


Examples

  • DATE("2021-02-18") results in a date value of 18-02-2021 (default format is used). 
  • DATE("01/01/2021", "dd/MM/yyyy") results in a date value of 01-01-2021 (specified format is used). 

Back to top