O'Reilly logo

Tera-Tom Genius Series - DB2 SQL by Leslie Nolander, Tom Coffing

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required