Chapter 6 – Date Functions

"An inch of time cannot be bought with an inch of gold."

- Chinese Proverb

Getting the System Date

image

The example above shows you how to get the system date. You must get them from sysibm.sysdummy1.

Extracting From a Timestamp

image

Above are the keywords you can utilize to extract the day, month and year from the sysibm.sysdummy1 table.

The EXTRACT Command

image

This is the Extract command. It returns a date part, such as a day, month ...

Get Tera-Tom Genius Series - DB2 SQL now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.