EasyManuals Logo
Home>HP>Software>TACL

HP TACL User Manual

HP TACL
235 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #43 background imageLoading...
Page #43 background image
Accessing Time Data
Developing TACL Programs
107365 Tandem Computers Incorporated 2–23
Converting Timestamps Into Different Formats
The macro in Figure 2-10, getdates, converts the current date from a three-word
timestamp to SQL format (yyyy-mm-dd), for use by report generators or other
programs. This type of macro could be used to generate SQL reports.
Figure 3-9 in Section 3, “Developing TACL Routines,” contains a modification of this
example that shows how a nested routine can return dates as results.
Figure 2-10. Converting Timestamps
?SECTION getdates MACRO
#FRAME
== Save the current setting of #OUTFORMAT,
== so that it can be restored later:
#PUSH #OUTFORMAT #INFORMAT
[#PUSH
date == starting date (30 days ago)
yyyy == year
mm == month
dd == day
]
#SET #OUTFORMAT PRETTY
== Get the date and convert to yyyy mm dd calendar format:
#SETMANY yyyy mm dd, [#CONTIME [#TIMESTAMP]]
== Store as yyyy-mm-dd format (SQL date format):
#SET date [yyyy]-[mm]-[dd]
== Display the results to the user
#OUTPUT The reports will use a date of [date]
{ place report-generation code here}
#UNFRAME

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the HP TACL and is the answer not in the manual?

HP TACL Specifications

General IconGeneral
BrandHP
ModelTACL
CategorySoftware
LanguageEnglish

Related product manuals