Time
The Time
Data Type is used to represent the time of the day. The time consists of an hour, minute, second, and millisecond, all of which begin at zero.
#Structure
Time
is an object with the following properties:
hour (
number
) - an hour of a day represented by a 24-hour clockminute (
number
) - the number of minutes into the hoursecond (
number
) - the number of seconds into the minute** millisecond** (
number
) - the number of milliseconds into the second
Examples
Let's assume we have an example_time
variable holding the following time:
We can use the TIME function, which takes the hour, the minute, the second and, optionally, the millisecond, for example, to create a time representing exactly noon:
Also, we can use the FORMAT_TIME function to format the time into the string "12 pm":
Last updated