
I have timestamp columns in a Db2 Table that I need to give the difference in hours, minutes, and seconds. Preferably I would put these into separate columns that I can then use in various ways in subsequent jobs and programs.
All you really needs to know about the Table I will be using is that it is called TESTTABLE, and the timestamp columns I need to calculate the difference between are:
- FROM_TIMESTAMP
- THRU_TIMESTAMP
I can easily determine the difference between the two with the following SQL statement: