Home Contents | # tostring(time) | Date/Time | Core4 Lua Commands

## SYNOPSIS

str = tostring(time)

## DESCRIPTION

A time in string context returns the time formatted as per ISO 8601 extended format.

## RETURN VALUE

A string formatted as "HH:MM:SS", with the hours formatted in 24h mode. If time is not valid, returns the string "??:??:??".

## ERRORS

Raises an error if time is not a time instance.

## EXAMPLE

> >
t = clock.currentTime() print (t)
11:16:41

## SEE ALSO

clock.currentTime, clock.newTime, time(), time:addMSecs, time:addSecs, time:format, time:hour, time:isNull, time:isValid, time:millisecondsFromMidnight, time:minute, time:minutesFromMidnight, time:msec, time:msecsTo, time:second, time:secondsFromMidnight, time:secsTo, time:set