SQL/MP Report Writer Guide
Table Of Contents
- What’s New in This Manual
- About This Manual
- 1 Introduction to the NonStop SQL/MP Report Writer
- 2 Using SQLCI and the Report Writer
- 3 Selecting Data for a Report
- 4 Customizing a Report
- Defining the Layout
- Specifying the Items in a Detail Line
- Naming Select List and Detail Line Items
- Organizing Rows Into Break Groups
- Labeling Information
- Formatting Data Values
- Formatting Dates and Times
- Using TACL to Pass Parameters
- Conditional Printing of Items or Line Entries
- Redefining Special Characters
- Calculating Totals
- Calculating Subtotals
- Printing Double-Byte Characters
- A Comparison of the Report Writer and the Enform Language
- Index

Customizing a Report
HP NonStop SQL/MP Report Writer Guide—527213-001
4-41
Formatting Dates and Times
Julian Timestamp Formats
By using the AS DATE/TIME clause, you can specify the date format and time format
of a Julian timestamp.
The following command specifies a page title that includes the local date and time:
S> PAGE TITLE "Supplier Parts Summary", TAB 30,
+> CURRENT_TIMESTAMP AS DATE * TIME *;
S> LIST N 1;
Supplier Parts Summary 02/24/87 09:43:04 PM
. .
. .
By default, the date and time are printed in these formats: M2/D2/Y2 and HP2:M2:S2.
You can change the default date and time formats for your SQLCI session by setting
the DATE_FORMAT and TIME_FORMAT style options as indicated:
>> SET STYLE DATE_FORMAT "MA3 D2, Y4",
+> TIME_FORMAT "HB 'hours' MB2 'minutes'";
The new default date format produces Feb 24, 2002, and the new default time format
produces 21 hours 44 minutes.
To print the time before the date, you can specify:
AS TIME * DATE *
If you want only the date or only the time printed, you can omit the option you do not
want.
To override the default date format, specify a date format in the AS DATE/TIME clause
of a report command:
S> PAGE TITLE "Supplier Parts Summary", TAB 30,
+> CURRENT_TIMESTAMP AS DATE "Y4 MA3 D2";
S> LIST N 1;
Supplier Parts Summary 2000 FEB 24
To override the default time format, specify a time format in the AS DATE/TIME clause.
For example, the following AS TIME clause specifies a format in local civil time:
S> REPORT FOOTING "Report completed at ",
+> CURRENT_TIMESTAMP AS TIME "HP2:M2" IN LCT;
S> LIST ALL;
. .
. .
Report completed at 02:14 AM
Table 4-2 on page 4-42 summarizes the characters you use to specify date and time
formats in an AS DATE/TIME clause, a DATE_FORMAT style option, or a
TIME_FORMAT style option.