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
Basit Khan
NA
336
122.5k
How to get the Year Period as per the currentDate(GetDate())
Feb 19 2017 5:00 AM
Hi,
How to get the Year Period as per the currentDate(GetDate()) depend upon Joining Date.
For Example.
Emp_No Joining Date As per todaycurrentDate(His One year period End)
1 14-Jul-2013 14-Jul-2017
2 14-Jul-2016 14-Jul-2017
3 01-Feb-2015 01-Feb-2017
How to do the query?
I use the case but this one will not suite.
CASE WHEN JoinDate < GetDate() THEN dateadd(DAY , 365 , JoinDate) ELSE 0 END
Thanks
Basit.
Reply
Answers (
1
)
Connectivity problem
Show this month and next month