Instruction
Good. Okay, let's move on – now we'll learn a practical application for intervals. But let's start from the beginning.
Our database knows the current date and time. It has three functions which can come in handy:
current_datereturns the current date.current_timereturn the current time.current_timestampreturns the current date with time and timezone.
Note that we don't use parentheses () after the function name, even though we indeed use a function. You can use them in the following way:
SELECT current_date, current_time, current_timestamp;
Shall we give it a try?
Exercise
Run the template query and analyze the result.
The functions current_date, current_time, and current_timestamp return the current time for the database server (in our case: UTC). Depending on where you are, this may or may not be the same as your local time.



