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