TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-73
#COMPUTETIMESTAMP Built-In Function
#COMPUTETIMESTAMP Built-In Function
Use #COMPUTETIMESTAMP to convert a calendar date to a four-word timestamp.
year
is a four-digit number, from 1975 through 9999, representing the year.
month
is a number in the range 1 to 12 indicating the month.
day
is a number in the range 1 to 31 indicating the day.
hour
is a number in the range 0 to 23 indicating the hour.
min
is a number in the range 0 to 59 indicating the minute.
sec
is a number in the range 0 to 59 indicating the second.
milli
is a number in the range 0 to 999 indicating the millisecond.
micro
is a number in the range 0 to 999 indicating the microsecond.
Result
#COMPUTETIMESTAMP returns a space-separated list of nine numbers. The first
number is the four-word timestamp. If an error occurs, TACL sets the first number to -
1. The other eight numbers are error flags that indicate range errors in the arguments.
An error flag is 0 if its matching argument is within the range for the date/time element
it specifies, or -1 if it is outside the range.
Example
This example shows #COMPUTETIMESTAMP output:
29> #OUTPUT [#COMPUTETIMESTAMP 1992 3 31 15 37 50 273 146]
211568816270273146 0 0 0 0 0 0 0 0
#COMPUTETIMESTAMP year month day hour min sec milli micro