Home Forums SQL Server 2012 SQL 2012 - General Converting Getdate to smalldate RE: Converting Getdate to smalldate
drew.allen
SSC Guru
Points: 76944
More actions
August 31, 2016 at 3:45 pm
#1898664
There are several ways that you can accomplish this. Probably the most straightforward is the following.
SELECT CAST(CAST(GETDATE() AS DATE) AS SMALLDATETIME)
Drew
J. Drew AllenBusiness Intelligence AnalystPhiladelphia, PA