Monday, December 14, 2009

Date (no time) in SQL

To get date only, u can use this:
select Convert(datetime, Convert(VARCHAR, getdate(), 101) , 101)
alternatively
select cast (floor (cast (createddate as float)) as datetime)
Reference: here
Complete reference: here

No comments: