Reputation: 1
column1 = '2023-01-09'
and column2 = '60'
select (column1 + column2) as column3
i need column3 as their sum but the value appears is 20230169 instead of 2023-03-09
Upvotes: 0
Views: 37
Reputation: 521239
You may use INTERVAL
syntax here:
SELECT '2023-01-09' + INTERVAL 59 DAY; -- 2023-03-09
But it seems that you really just want to add 2 months:
SELECT '2023-01-09' + INTERVAL 2 MONTH; -- 2023-03-09
Upvotes: 4