[thelist] Using Wildcards and Dates in SQL Server

David Mitchell dmitchell at oproma.com
Tue Jun 17 11:58:27 CDT 2003


So you're trying to get all records for June 2003? Try this:

SELECT * from curEvents where DATEPART(month, GETDATE()) = 6 and
DATEPART(year, GETDATE()) = 2003




More information about the thelist mailing list