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.