ToTimeOfDay
Converts a timestamp or text value into a time.
Variants
ToTimeOfDay(Text text)
Converts the text value into a time.
Parameters
- text
- The text value you want to convert.
Returns
Time
Description
The text can represent various popular time formats, including "3 pm", "3:04 pm", "22:00", "2:03:29 am", and "12:03:29.345".
Examples
ToTimeOfDay("3 pm")
returns the time value "3:00 PM".ToTimeOfDay("3:04 pm")
returns the time value "3:04 PM".ToTimeOfDay("22:00")
returns the time value "10:00 PM".ToTimeOfDay("2:03:29 am")
returns the time value "2:03 AM".ToTimeOfDay("12:03:29.345")
returns the time value "12:03 PM".
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:23 AM" stored in the Timestamp column and returns the time value "9:21 AM".