ToTimeOfDay
Converts a timestamp or text value into a time.
Variants
- ToTimeOfDay(Text text)
- ToTimeOfDay(Text text, Text culture)
- ToTimeOfDay(Timestamp timestamp)
- ToTimeOfDay(Timestamp timestamp, Text timezone)
ToTimeOfDay(Text text)
Converts the text value in the hh:mm:ss format into a time.
Parameters
- text
- The text value you want to convert.
Returns
Time
Examples
ToTimeOfDay("22:00")returns the time value #22:00#.ToTimeOfDay("12:03:29")returns the time value #12:03:29#.
ToTimeOfDay(Text text, Text culture)
Converts the text value into a time using the specified culture.
Parameters
- text
- The text value you want to convert.
- culture
- The culture name.
Returns
Time
Examples
ToTimeOfDay("3:04 pm", "en-US")returns the time value #15:04#.
ToTimeOfDay(Timestamp timestamp)
Converts the timestamp into a time by returning the time, in the local time zone, in which the timestamp falls.
Parameters
- timestamp
- The timestamp value you want to convert.
Returns
Time
Examples
ToTimeOfDay([Timestamp Column])takes the timestamp value 11/5/2012 9:21 AM stored in the Timestamp column and returns the time value 9:21 AM.
ToTimeOfDay(Timestamp timestamp, Text timezone)
Converts the timestamp into a time by returning the time, 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
Time
Examples
ToTimeOfDay([Timestamp Column], "America/New_York")takes the timestamp value 11/5/2012 9:21:23 AM UTC stored in the Timestamp column and returns the time value 4:21 AM in the timezone of New York.