cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
brianraley
Engaged Sweeper III
How can I strip off the timestamp from PurchaseDate, Warrantydate, and Bios.ReleaseDate?

Select Top 1000000 tsysOS.Image As icon,
tblAssets.AssetID,
tblAssets.AssetName,
DatePart(yyyy, tblBIOS.ReleaseDate) As BiosYear,
tblAssetCustom.PurchaseDate,
tblAssetCustom.Warrantydate,
tblAssets.Domain,
tblAssets.Username,
tblAssets.Userdomain,
tblBIOS.ReleaseDate As BiosDate,
tblAssets.IPAddress,
tsysOS.OSname,
tblAssets.SP,
tblAssets.Lastseen,
tblAssets.Description,
tblAssets.Processor,
tblAssets.NrProcessors,
tblAssets.Memory
From tblAssets
Inner Join tsysOS On tsysOS.OScode = tblAssets.OScode
Inner Join tblBIOS On tblAssets.AssetID = tblBIOS.AssetID
Inner Join tblAssetCustom On tblAssets.AssetID = tblAssetCustom.AssetID
Order By BiosDate,
BiosYear,
tblAssets.AssetUnique
1 ACCEPTED SOLUTION
RCorbeil
Honored Sweeper II
Convert(VarChar(10), your_date_field, 121) AS fieldname

See MSDN documentation and W3Schools documentation.

View solution in original post

1 REPLY 1
RCorbeil
Honored Sweeper II
Convert(VarChar(10), your_date_field, 121) AS fieldname

See MSDN documentation and W3Schools documentation.