Guest_imported
New member
- Jan 1, 1970
- 0
I am trying to compare dates. I want to pull out all records that fall within a given month and year. For example: Say I want to pull out all records for 3/02(March of 2002). How can I get it to ignore the day part of the date? This is for an "event search" so I have start dates and end dates for each event. I want to be able to search for all events happening in a certain month. I have tried using cast with wildcards in the day part of the date but it doesn't like that.
This is something like I need but it doesn't work:
SELECT *
FROM EVENTTABLE
WHERE CAST('month/*/year' AS DATE) BETWEEN STARTDATE AND ENDDATE
Any help is greatly appreciated!
Thanks
This is something like I need but it doesn't work:
SELECT *
FROM EVENTTABLE
WHERE CAST('month/*/year' AS DATE) BETWEEN STARTDATE AND ENDDATE
Any help is greatly appreciated!
Thanks