Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Cast DATETIME

Author  Topic 

linda9898
Starting Member

28 Posts

Posted - 2008-04-24 : 09:26:14
Hi all,

i need help for deleting the time from a datetime type

what i mean is that instead of
2007-08-15 01:30:00.000
i would get
2007-08-15 00:00:00.000

many thanks

elancaster
A very urgent SQL Yakette

1208 Posts

Posted - 2008-04-24 : 09:28:05
select dateadd(day,datediff(day,0,DateCol),0)

Em
Go to Top of Page

linda9898
Starting Member

28 Posts

Posted - 2008-04-24 : 09:32:03
many thanks
Go to Top of Page
   

- Advertisement -