Date Display Explained

NOMAD/UltraQuest DATE Display Format Explained

UltraQuest and NOMAD have powerful date handling capabilities. At the heart of this is the DATE display format.


In COBOL/VSAM applications, dates are typically stored as character strings, and it is left to the program accessing them to interpret the results. However, in UltraQuest and NOMAD, dates are a distinct data type, as in DB2.

Dates have wide flexibility in how they are entered and displayed.  Following are some examples of how the first day in August of 2011 may be displayed:

Display Format Display
DATE'MM/DD/YY' 08/01/2011
DATE'Mon DD, YYYY Aug 01, 2011
DATE'YYYY.MM.DD' 2001.08.01

In UltraQuest, the display format is entered in the Column Attributes dialog of the Design desktop, under Column format.

IMPORTANT: When entering the Display Format make sure you do not put a space between DATE and the desired format enclosed with single quotes (').

Dates may also be entered in varying formats. Suppose you have built a data filter using a prompted variable:

(SALES.SALEDATE BETWEEN ({first_date},{last_date}))

When prompted in the Execution Options dialog, the UltraQuest Reporter or Library user may enter dates in any meaningful fashion. For example, to restrict a report to sales that occurred in the first quarter, the following dates may be entered for the first and last dates, respectively:

JAN 01, 2011
03/31/11

In NOMAD, the equivalent syntax for this data filter is:

SELECT SALES.SALEDATE BETWEEN (&FIRST_DATE, &LAST_DATE);

For full documentation of how dates may be displayed or entered, refer to the UltraQuest and NOMAD Reference Manual, Chapter 3, under "Display Format Types."

Please feel to contact UltraQuest and NOMAD support if you have any additional questions about date formats.

Next week's topic: simple date arithmetic , using arithmetic operators and the ADDATE function

NOMAD/UltraQuest DATE Display Format Explained