XFA Specification
Chapter 23, FormCalc Specification
Date And Time Built-in Functions
851
Num2Time()
This function returns a time string, given a number of milliseconds from the
epoch.
Syntax
Num2Time(n1 [,f1 [, k1]])
Parameters
n1
is the number of milliseconds.
f1
is a time picture clause, as
defined
above.
If f1 is omitted, the
default time picture clause
is used.
k1
is a locale identifier string, as described in
“Specifying a Locale (Locale Identifier String)” on
If k1 is omitted, the
prevailing locale
Returns
The time string or null if any of its parameters are null.
The formatted time is in the format given in f1, governed by the locale given in k1.
The locale is used to format any timezone names.
If the given time is invalid, the function returns an empty string.
Examples
Calling Num2Time() as follows …
Num2Time(1, "HH:MM:SS")
Returns
"00:00:00" in Greenwich, England and "09:00:00" in
Tokyo
"13:13:13 EST" in Boston
"13:13:13 GMT-05:00" to a German Swiss user in Boston
"13.13 Uhr GMT+01:00" to a user in Zurich
"13:13+01:00" to that same user in Zurich
Num2Time(65593001, "HH:MM:SS Z")
Num2Time(65593001,
"HH:MM:SS Z", "de_CH")
Num2Time(43993001,
TimeFmt(4, "de_CH"), "de_CH")
Num2Time(43993001, "HH:MM:SSzz")
See Also
Date2Num()
DateFmt()
Date()