I would like to calculate the days between Purchase Date and Warranty Date.
Can anybody help me please.
Select Top 1000000 tsysOS.Image As icon,
tblAssetCustom.BarCode As [Asset ID #],
tblAssets.AssetID,
tblAssets.AssetName,
tblAssetCustom.Location,
tblADusers.Displayname As Username,
tblADusers.Department As [User Department],
tblAssetCustom.Manufacturer,
tblAssetCustom.Model,
tblAssetCustom.Custom1 As [Purchase Price],
tblAssetCustom.Serialnumber,
tblAssetCustom.Custom2 As [Checked Date],
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate
From tblAssets
Inner Join tblADusers On tblAssets.Username = tblADusers.Username
Inner Join tblComputersystem On tblAssets.AssetID = tblComputersystem.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Inner Join tsysOS On tblAssets.OScode = tsysOS.OScode
Left Join tsysIPLocations On tblAssets.IPNumeric >= tsysIPLocations.StartIP
And tblAssets.IPNumeric <= tsysIPLocations.EndIP
Where tblComputersystem.Domainrole < 2 And tblComputersystem.PartOfDomain = 1
And tblAssetCustom.State = 1
Order By tblAssets.AssetName