- Moderator
- #1
I need to write a query off of a table that looks like this:
SKU StartDate EndDate
1234 5/1/2010 5/15/2010
... so that it finds all records based on today's date which is between StartDate and EndDate.
BUT... I also have to ignore the year....
In other words, if today is 5/2/2011, since that is between 5/1 and 5/15, it should find the record with SKU 1234.
... or is there another way to do a date field with JUST the month and day?
So, in other other words (God, this is such a bad habit, explaining everything at LEAST twice so I make sure my listener gets it.... <sigh>)
Every year, starting on 5/1, and continuing until 5/15, my query should hit that record.
Any thoughts?
Just my 2¢
"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."
--Greg
SKU StartDate EndDate
1234 5/1/2010 5/15/2010
... so that it finds all records based on today's date which is between StartDate and EndDate.
BUT... I also have to ignore the year....
In other words, if today is 5/2/2011, since that is between 5/1 and 5/15, it should find the record with SKU 1234.
... or is there another way to do a date field with JUST the month and day?
So, in other other words (God, this is such a bad habit, explaining everything at LEAST twice so I make sure my listener gets it.... <sigh>)
Every year, starting on 5/1, and continuing until 5/15, my query should hit that record.
Any thoughts?
Just my 2¢
"What the captain doesn't realize is that we've secretly replaced his Dilithium Crystals with new Folger's Crystals."
--Greg