Hi,
I´d like to display anniversary greetings on my website. The annyversaries
are saved in a mysql-table in the mysql DATE-Format (YYYY-MM-DD). Now I need
to select all rows where the day and the month is between now and +7 days
(to show the anniversaries coming up within the next week). My question is:
Is there a way to select these rows directly from the DB without recognizing
the year? Or do I have to query all rows and parse the dates in code?
Any help appreciated!
Thanks in advance,
Hinrich
I´d like to display anniversary greetings on my website. The annyversaries
are saved in a mysql-table in the mysql DATE-Format (YYYY-MM-DD). Now I need
to select all rows where the day and the month is between now and +7 days
(to show the anniversaries coming up within the next week). My question is:
Is there a way to select these rows directly from the DB without recognizing
the year? Or do I have to query all rows and parse the dates in code?
Any help appreciated!
Thanks in advance,
Hinrich
Comment