Database Solutions
Monday, November 24, 2008
Get date of next Sunday based on a date
If you need to find the date on next sunday based on a date value supplied, use the following query
SELECT DATEADD(wk,DATEDIFF(wk,0,cast('20081121' as datetime)+7),0)-1
Source:
http://www.sqlservercentral.com/Forums/Topic606669-338-3.aspx
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment