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
nitin singh
NA
19
2.9k
need to get 15 years back date from datetime
Jan 10 2019 5:58 AM
I have below 2 dates(yyyymmdd format) with which i have to work with
Date1: 2019-02-01
canceldate= 2004-02-28
Now i have select all the records for whome Dte1-canceldate>=15
i used DATEDIFF(YEAR,canceldate,Date1).
Using this command the above condition is satisfied considering difference in year. But actually canceldate 2004-02-28 <15 year and record with canceldate shud not have been selected.
Please let me know how can i correct the above issue
Reply
Answers (
3
)
How to Update Table using Left Join between two table?
How can i do sorting in sql?