TACL Reference Manual

Built-In Functions and Variables
HP NonStop TACL Reference Manual429513-018
9-75
#CONTIME Built-In Function
#CONTIME Built-In Function
Use #CONTIME to break down a three-word timestamp into a seven-number set of
date and time components.
timestamp
is a decimal number obtained from #TIMESTAMP or from #FILEINFO /
MODIFICATION /.
Result
#CONTIME returns seven numbers representing various components of date and time
(year, month, day, hour, minute, second, hundredths of a second), as shown in the
following examples.
Examples
1. Assuming #INFORMAT is set to TACL, this example illustrates the use of
#CONTIME with #TIMESTAMP:
14> #OUTPUT [#CONTIME [#TIMESTAMP]] 1992 06 27 9 28 16 16
2. This code shows how portions of a timestamp can be extracted and used to create
a file name that includes the month and day the file was created:
#PUSH date month list
#SETMANY _ month date, [#CONTIME [#TIMESTAMP]]
#CHARINSV date 1 month == Insert mm before dd in date
VARTOFILE list TEMP[date] == Output to a file named TEMPmmdd
If, for example, the date were June 10, this code would create a file named
TEMP0610.
#CONTIME timestamp