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)-
Xis any object
-
-
time(h, m, s[, z])-
h,m,s, andzare integers
-
Description
-
time()returns the current time as aTimestructure. -
time(X), whereXis a timestamp, aTimestructure, or aDateTimestructure, returns this time, or the time part ofX, as aTimestructure. -
time(h, m, s, z)encodes the time with hourh, minutem, seconds, and millisecondz(defaults to0) as aTimestructure.
Examples
time()
hour: 21 minute: 13 second: 17 millisecond: 449
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: 13 second: 17 millisecond: 449