Search This Blog & Web

Wednesday, July 29, 2009

How to remove time postion from date in SQL server 2005

we can remove time portion in different ways.


1. select DATEADD(DD, DATEDIFF(DD, 0, GETDATE()),0)
2. select convert(datetime,cast(GETDATE() as varchar(12)) , 103)
3. select convert(datetime,cast(getdate() as int) , 103) - 1


if you know any other please mention.

1 comment: