DateParse uses a provided format to parse a text value into an ISO date time.

See Sigma's Common Date Functions and Use Cases lab for more information about date functions, including use cases and exercises.

Usage

DateParse(text, format)

text (required) - The text value to be parsed. 

format (required) - The format to apply to the text value when parsing. This is the format represented in the text value. See format options.

Examples

DateParse("03-Sep-2020:03:05:13", "%d-%b-%Y:%H:%M:%S")
  • The above will return the ISO date time 2020-09-03 03:05:13.
DateParse([Text Date], "%d/%b/%Y:%H:%M:%S")
  • The example above parses text dates with the specified format (e.g., 03/Sep/2020:03:12:38) and returns the equivalent ISO date time (e.g., 2020-09-03 03:12:38). 
DateParse([Text Date], "%d/%b/%Y")
  • The example above parses a column of text dates with the specified format (e.g., 03/Sep/2020) and returns the equivalent ISO date time (e.g., 2020-09-03 00:00:00).
DateParse([Text Date], "[%d/%b/%Y]")
  • The example above parses a column of text dates with the specified format (e.g., [03/Sep/2020]) and returns the equivalent ISO date time (e.g., 2020-09-03 00:00:00).

 

Related Documentation

Date Functions Overview
Date
DateTime
Types of Values


Was this page helpful?
Yes No