TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sathish
NA
263
0
Leap year increment
Sep 20 2019 4:20 AM
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
Reply
Answers (
2
)
Update Statement Not Working inside while loop
Problem with syntax in Dynamic Sql statement