v.1.1.54310New Feature
Added Support for Arithmetic Operations with Time Intervals
Added support for arithmetic operations with time intervals.
Why it matters
This feature was introduced to allow users to easily add or subtract time intervals (such as days, hours, minutes) to or from date and datetime values within queries, simplifying date manipulations and improving query expressiveness and readability.How to use it
You can use arithmetic operations (+, -) between date/datetime columns or literals and time intervals specified using the INTERVAL keyword. For example:SELECT event_time + INTERVAL 1 DAY AS next_day FROM events;
SELECT order_date - INTERVAL 2 HOUR AS adjusted_time FROM orders;This makes date/time calculations more straightforward in your queries by allowing direct addition or subtraction of intervals.