A Gentle Introduction to
How to work with dates; adding, subtracting and formatting.
Many implementations allow dates to be treated as numbers. We can add a number of days to a date.
Dates are often stored as the number of days since a fixed time.
We want to know how long has it been since Tom Jones featured on TOTP.
SELECT singer, song, ROUND(SYSDATE - wk) "days" FROM gisq.totp WHERE singer = 'Tom Jones'