Best April deals - hours only!Up to 80% off on all courses and bundles.-Close
Dealing with dates
Working with time
Date and time data types in PostgreSQL
Extracting dates and times
Timezone conversion
Format date and time
Current date and time data


Great! Let's look at the AGE(start_timestamp) function. It takes only one date and returns the difference between the current date and time, and the one given as the argument. Look at the example below:

SELECT AGE(flight_date)
FROM flight;

This query returns the time duration between today and the flight date.


For each aircraft show its ID and how much time has passed since withdrawing as the difference column.

Stuck? Here's a hint!

Use this expression:

AGE(withdrawn_timestamp) AS difference