Forum Moderators: coopster
I am working on a calendar in php.
On the calendar table, i need to find the entry with che closest day to the actual day, of course avoiding dates in the past.
I am exploring all the built-in mysql functions but I have not found anything yet.
Can anyone help me?
[faqts.com...]
DAYNAME( date)
Returns the name of the day of the week for the given date (e.g., DAYNAME('1998-08-22') returns "Saturday").
DAYOFMONTH( date)
Returns the day of the month for the given date (e.g., DAYOFMONTH('1998-08-22') returns "22").
DAYOFWEEK( date)
Returns the number of the day of the week (1 is Sunday) for the given date (e.g., DAY_OF_WEEK('1998-08-22') returns "7").
DAYOFYEAR( date)
Returns the day of the year for the given date (e.g., DAYOFYEAR('1983-02-15') returns "46").
Glenn Hefley