Posted by Plamen Ratchev on 05/10/07 12:34
Here is an alternative to Dan's method, just using only the datetime functions: WHERE SoldDate >= DATEADD(year, -1, DATEADD(month, DATEDIFF(month, 0, CURRENT_TIMESTAMP), 0)) AND SoldDate < DATEADD(month, DATEDIFF(month, 0, CURRENT_TIMESTAMP), 0) HTH, Plamen Ratchev http://www.SQLStudio.com
[Reply to this message]
Copyright © 2005-2006 Powered by Custom PHP Programming