Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

quarter date

0 views
Skip to first unread message

jmann

unread,
May 30, 2006, 2:54:01 PM5/30/06
to
How can I calculate the first day of the quarter based on the current date?

Ex. Today's date is 5/30/06. I'm trying to get 4/1/06.

Thanks!

SQL Menace

unread,
May 30, 2006, 3:00:19 PM5/30/06
to
Like this....

SELECT DATEADD(qq, DATEDIFF(qq, 0, GETDATE())+0, 0)


Denis the SQL Menace
http://sqlservercode.blogspot.com/

Omnibuzz

unread,
May 30, 2006, 3:17:01 PM5/30/06
to
Boy.. excellent piece of code :)

jmann

unread,
May 30, 2006, 3:29:02 PM5/30/06
to
Perfect, thanks so much!

SQL Menace

unread,
May 30, 2006, 4:20:57 PM5/30/06
to
Thanks
0 new messages