Deals Of The Week - hours only!Up to 80% off on all courses and bundles.-Close
Introduction
Dates
Time
Timestamps
Extract functions
Timezone conversion
Intervals
Current date and time
Review

Instruction

The addition failed because our database thinks that '2015-01-01' is a common text value (string) and it's not able to add an interval to a text field. What can we do then? We can explicitly convert '2015-01-01' to a date/timestamp:

SELECT CAST('2015-01-01' AS timestamp) + INTERVAL '5' DAY;

Let's see if it works.

Exercise

Run the new template to see if this query works.