Introduction
Dates
Time
Timestamps
Extract functions
Timezone conversion
Intervals
Current date and time
38. Current date & time with intervals – additional practice
Revision

Instruction

Alright! Let's do one more exercise in this regard.

Exercise

Find the code of all the routes which normally depart within 3 hours from the current time.

Stuck? Here's a hint!

The interval you're looking for is:

BETWEEN CURRENT_TIME AND CURRENT_TIME + INTERVAL '3' HOUR

Console

Code editor

Result

TableConsole