Instruction
Fantastic job! It's time to review what we know about date and time.
- SQL features dates (
'2010-01-01'), times ('13:00:00') and timestamps ('2010-01-01 13:00:00'). - You can compare the above types, use
BETWEEN, andORDER BYwith them. - The function
EXTRACT(DAY FROM column)extracts certain parts of date/time. - Use
AT TIME ZONEswitches between time zones. INTERVAL '7' DAYis an interval of 7 days which you can add to or subtract from a timestamp/date.INTERVAL '2-1' YEAR TO MONTHis another type of interval, this one is an interval of 2 years and 1 month.- For current date and time, you can use
CURRENT_DATE,CURRENT_TIMEorCURRENT_TIMESTAMP.
Are you ready to practice?
Exercise
Click to start our practice.



