Unanswered: Selecting records by date using DAYOFYEAR()
I'm not very well versed in mySQL but I've found myself using it every now and then. I need to select all records that have a date value within the next two weeks. What I've currently got is this:
select DATE_FORMAT(date, '%m\/\%d\/\%y'), location, time, id, numFree from refugee_clinical WHERE DAYOFYEAR(date) BETWEEN DAYOFYEAR(CURRENT_DATE) and (DAYOFYEAR(CURRENT_DATE)+14) order by date;";
This works, but I don't think that it will return the proper results from December 18th until January 1st as (CURRENT_DATE)+14 is going to be returning values above 365. Is there any easy way to get around this problem or should I just redesign the select statement using a different function?