kdeutsch
asked on
finding difference between dates
What I am trying to do is take todays date and find the difference in years from another date, I don't want it to round, so if its 6.5, 6.2, 6.7, 6.8 it woould all be 6 years. i thought about using the GetDate function but don't know how to use the syntax or even if thats what to use. Thanks
Select m.dtStartDate,
m.dtEnddate,
p.strSSN,
s.sidstrNAME_IND,
s.sidstrGR_ABBR_CODE + '/' + s.sidstrPay_GR as Rank,
GetDate s.siddatPEBD
from tblSadMission as m INNER JOIN
tblAssignedPersonnel as p on p.strssn = p.strssn INNER JOIN
cms.dbo.tblSidpers as s on p.strssn = s.sidstrssn_SM
Select m.dtStartDate,
m.dtEnddate,
p.strSSN,
s.sidstrNAME_IND,
s.sidstrGR_ABBR_CODE + '/' + s.sidstrPay_GR as Rank,
GetDate s.siddatPEBD
from tblSadMission as m INNER JOIN
tblAssignedPersonnel as p on p.strssn = p.strssn INNER JOIN
cms.dbo.tblSidpers as s on p.strssn = s.sidstrssn_SM
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER