Documentation

time

Syntax: %time(format)

return the current date/time. If format is null (or missing), a long format is used. Otherwise, use characters to select what and how time information is returned.

Valid format codes:

a: day of week
c: date and time (numeric)
d: day of month/day of week
e: year
h: hour (24hour format)
m: month
n: minute
s: second
t: time
y: year
z: millisecond
a/p: either am or pm (when used with h converts from 24hour format)

The result of this function partially depends on the systems language settings.

Example:

#SAY %time()
equivalent to %time("ddd mmmm d, yyyy h:nn:ss am/pm") and displays the time in the uses the longest possible format
#SAY %time(c)
displays date and time (in number-format)
#SAY %time("aaa aaaa")
displays the day of the week in short and long format
#FORALL {a|d|m|y|e|c|t|h|n|s|z} {#SH %i: %time(%i) | %time(%i%i) | %time(%i%i%i) | %time(%i%i%i%i)}
outputs a table for all length-dependent parameters %time
#SH %time("hh#nn#ss")
(with German localization) displays eg.: 18#26#13

Add comment

Login or register to post comments