How to get Date and Time from Timestamp in DB2

Extracting the date and time independently from a timestamp in an easy way:

Extract Time


current date
current timestamp
TIME(current timestamp)

Date and Time calculation

You can also perform date and time calculations :

Example -2

current date + 1 YEAR
current date + 3 YEARS + 2 MONTHS + 15 DAYS
current time + 5 HOURS - 3 MINUTES + 10 SECONDS

Recent Posts

Author: Srini

Experienced software developer. Skills in Development, Coding, Testing and Debugging. Good Data analytic skills (Data Warehousing and BI). Also skills in Mainframe.