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
 General SQL Server Forums
 New to SQL Server Programming
 date problem

Author  Topic 

schhetri
Starting Member

1 Post

Posted - 2008-12-12 : 06:16:05
I have a datefield which has data like
2008-11-12 00 00 00.000

and i need the result weekly for which i will have to round it off or trunc it of

can u help

soorajtnpki
Posting Yak Master

231 Posts

Posted - 2008-12-12 : 06:19:37
hi
can u pls give ur expecting result
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-12-12 : 09:02:28
seems like this is what you want

DATEADD(wk,DATEDIFF(wk,0,datevalue),0)
Go to Top of Page
   

- Advertisement -