We can add "half-year interval" in the date by -
(A) By adding 6 months interval
mysql> Select '2017-06-20' + INTERVAL 6 Month AS 'After Half Year Interval'; +--------------------------+ | After Half Year Interval | +--------------------------+ | 2017-12-20 | +--------------------------+ 1 row in set (0.00 sec)
(B) Add an interval of 2 quarters
mysql> Select '2017-06-20' + INTERVAL 2 Quarter AS 'After Half Year Interval'; +--------------------------+ | After Half Year Interval | +--------------------------+ | 2017-12-20 | +--------------------------+ 1 row in set (0.00 sec)
The above query will add a half-year interval to the date with the help of the Quarter keyword.
The above is the detailed content of What are the different ways in MySQL to add a 'half year gap' to a date?. For more information, please follow other related articles on the PHP Chinese website!