ToDate
Converts a timestamp or text value to a date.
Variants
- ToDate(Text text)
- ToDate(Text text, Text culture)
- ToDate(Timestamp timestamp)
- ToDate(Timestamp timestamp, Text timezone)
ToDate(Text text)
Converts the text value in the YYYY-MM-DD format into a date.
Parameters
- text
- The text value you want to convert.
Returns
Date
Examples
ToDate("2012-01-15")returns the date value #2012-01-15#.
ToDate(Text text, Text culture)
Converts the text value into a date using the specified culture.
Parameters
- text
- The text value you want to convert.
- culture
- The culture name.
Returns
Date
Examples
ToDate("Monday, 13 December 2010", "en-US")returns the date value #2010-12-13#.ToDate("08/05/2024", "fr-FR")returns the date value #2024-05-08#.
ToDate(Timestamp timestamp)
Converts the timestamp into a date by returning the date, in the current user time zone, in which the timestamp falls.
Parameters
- timestamp
- The timestamp value you want to convert.
Returns
Date
Examples
ToDate(#2013-03-25 11:28:57#)returns the date value 3/25/2013.
ToDate(Timestamp timestamp, Text timezone)
Converts the timestamp into a date by returning the date, in the specified time zone, in which the timestamp falls.
Parameters
- timestamp
- The timestamp value you want to convert.
- timezone
- The timezone to convert timestamp argument to, out of the list of valid timezone identifiers.
Returns
Date
Examples
ToDate(#2013-03-25 03:28:57#, "America/New_York")returns the date value 3/24/2013.