The resulting value of HOUR would equal 12.

MICROSECOND Query for iSeries function

The MICROSECOND function returns the microsecond part of a value. The form is:

MICROSECOND ( expression )

The argument must be either a:

vTimestamp

vTimestamp duration

vValid character representation of a timestamp

The result of the function is a binary field. If the argument can be null, the result can be null. If the argument is null, the result is null.

If the argument is a timestamp, the result is the microsecond part of the timestamp, which is a binary field with a value between 0 and 999999.

If the argument is a timestamp duration, the result is the microsecond part of the timestamp duration, which is a binary field with a value between −999999 and 999999.

Example:

MICROSECOND(TIMESTAMP) where TIMESTAMP = 1991-10-22-12.15.23.123456

The resulting value of MICROSECOND equals 123456.

MINUTE Query for iSeries function

The MINUTE function returns the minute part of a value. The form is:

MINUTE ( expression )

The argument must be either a:

vTime

vTimestamp

vTime duration

vTimestamp duration

The result of the function is a binary field. If the argument can be null, the result can be null. If the argument is null, the result is null.

If the argument is a time duration or a timestamp duration, the result is the minute part of the value, which is a binary field with a value between &minus 99 and 99. A nonzero result has the same sign as the argument.

Example:

MINUTE(TIMESTAMP) where TIMESTAMP = 1991-10-22-12.15.23.123456

The resulting value of MINUTE equals 15.

Chapter 5. Defining result fields in Query for iSeries 77

Page 89
Image 89
IBM SC41-5210-04 manual Microsecond Query for iSeries function, Minute Query for iSeries function