time
Returns the current time, a specific time, converts a timestamp to a time structure, or extracts the time of a datetime
Syntax
-
time()
-
time(X)
-
X
is any object
-
-
time(h, m, s[, z])
-
h
,m
,s
, andz
are integers
-
Description
-
time()
returns the current time as aTime
structure. -
time(X)
, whereX
is a timestamp, aTime
structure, or aDateTime
structure, returns this time, or the time part ofX
, as aTime
structure. -
time(h, m, s, z)
encodes the time with hourh
, minutem
, seconds
, and millisecondz
(defaults to0
) as aTime
structure.
Examples
time()
hour: 21 minute: 1 second: 23 millisecond: 807
time(0.5)
hour: 12 minute: 0 second: 0 millisecond: 0
time(14, 30, 00)
hour: 14 minute: 30 second: 0 millisecond: 0
time(now())
hour: 21 minute: 1 second: 23 millisecond: 807