Skip to content

time

Construct a time fraction from hour, minute, second.

v = time(hour, minute, second)

Returns a fraction of a day — (hour + minute/60 + second/3600) / 24. Add to a date serial to get a date-time.

time(14, 30, 0) % 0.6042 (= 14:30)
  • timevalue — Parse a time string into a fraction of a day.
  • now — Current date and time as a serial date-time number.
  • hour — Hour component of a time (0–23).
  • minute — Minute component of a time (0–59).
  • second — Second component of a time (0–59).