Hi,
I have a logic to increment the year by 1 ..so the below one I used in sql
@date='2019-01-31'
select dateadd(year,1,@date')
It gives me result as '2020-01-31'
@date='2019-02-28'
But for Feb since 2020 leap year if I do the same its gives result as '2020-02-28' instead should
give '2020-02-29'
Kindly let me know the query to verify and get this one.
Thanks
Sathish

Priyanka JainRank #356 · 7K reputationPosted Sep 20, 2019, 12:40 AM EDT
Jefferson S. MottaRank #207 · 11.7K reputationPosted Oct 13, 2019, 1:48 PM EDT