beautypg.com

HP Neoview Release 2.4 Software User Manual

Page 34

background image

Interval data types

Interval data types require a formatstring.

There is no default for interval fields.

These field specifiers are allowed:

— For year-month ranges:

%Y — year

%M — month

— For day-time ranges:

%D — day

%H — hour

%M — minutes

%S — seconds (can include fractional seconds)

The values for specifiers must be positive integers.

Specifiers must appear in order from day to seconds. For example, %M (minutes) cannot
precede %H (hours).

Negative interval values always have a minus sign to the left of the integers, with no
spaces between the minus sign and the integers.

The supported field delimiters are:
— hyphen (-) for year-month ranges
— colon (:) for day-time ranges

Examples are:
— To specify a formatstring for a year-month duration of 3 years and 2 months

formatted as “3-2”:

“%Y-%M”

— To specify a formatstring for a year-month duration of 10 years formatted as

“10”:

“%Y”

— To specify a formatstring for a day-time duration of 30.5 seconds formatted as

“30.5”:

“%S”

— To specify a formatstring for a day-time duration of 1 day, 2 hours, 3 minutes,

and 4 seconds formatted as “1:2:3:4”:

“%D:%H:%M:%D”

— The following formatstring is invalid because fields are not specified in order

from day to seconds:

“%H:%M:%D:%S”

Table 5-2 Typeformats: format_definition Date/Time Format String Examples

Example

Description

"%C%y%m%d"

Specify a formatstring for a date field without field
delimiters, in the format of "20070131"

"%C%y-%m-%d"

Specify a formatstring for a date field with hyphen
delimiters, in the format of "2007-01-31"

34

Control File Organization and Syntax