cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
akira
Engaged Sweeper II
Hello,

I am making a report right now and would like to add PC Replacement Date on there. Our replacement cycle is every 5 years, so I was wondering how I could add 5 years to the PC Purchase Date in my report.

Below is the code for my report:

Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName As Asset,
tblAssets.Domain,
tblAssetCustom.Manufacturer As Make,
tblAssetCustom.Model,
tsysOS.OSname As OS,
tblAssets.Username,
tblAssets.Lastseen As [Last Seen],
tblAssetCustom.PurchaseDate As [PC Purchase Date],
tblAssetCustom.Warrantydate As [Warranty End Date],
Max(tblQuickFixEngineering.Lastchanged) As [Last Patch Detected]
From tblAssets
Inner Join tblQuickFixEngineering On tblAssets.AssetID =
tblQuickFixEngineering.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblQuickFixEngineeringUni On tblQuickFixEngineeringUni.QFEID =
tblQuickFixEngineering.QFEID
Group By tsysOS.Image,
tblAssets.AssetID,
tblAssets.AssetName,
tblAssets.Domain,
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tsysOS.OSname,
tblAssets.Username,
tblAssets.Lastseen,
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate
Order By Asset


Thank you!
2 REPLIES 2
akira
Engaged Sweeper II
Thanks!
RCorbeil
Honored Sweeper II
Refer to the DateAdd() function.

DateAdd(year, 5, tblAssetCustom.PurchaseDate) AS [Replacement Date]