Results 1 to 1 of 1
Feb 14, 2009, 13:28 #1
Comparing string dates to current date for month and day
Trying to set the display column to a no if the ending date is before or at the current date. Comparing string dates to the current date for month and day only.
Am using CONCAT because the ending date needs to be figured into a date as month_end is in a varchar type and day_end is a tinyint type.
The query does run, but it affects everything where continuous != 'always' - seeming to ignore the AND part.
UPDATE Listings SET display = 'no'
WHERE continuous != 'always'
AND STR_TO_DATE(CONCAT(month_end, '-', day_end), '%M-%e')
<= DATE_FORMAT(CURDATE(), '%M-%e')
What should be done differently here?