SQL – MySQL ADDDATE() Function
The MySQL ADDDATE() function adds a time/date interval to a date and then returns the date.
The MySQL ADDDATE() function adds a time/date interval to a date and then returns the date.
The MySQL ADDTIME() function adds a time interval to a time/datetime and then returns the time/datetime.
The MySQL CURDATE() function returns the current date as “YYYY-MM-DD” (string) or as YYYYMMDD (numeric).
The MySQL CURRENT_DATE() function returns the current date as “YYYY-MM-DD” (string) or as YYYYMMDD (numeric).
The MySQL CURRENT_TIME() function returns the current time as “HH-MM-SS” (string) or as HHMMSS.uuuuuu (numeric).
The MySQL CURRENT_TIMESTAMP() function returns the current date and time as “YYYY-MM-DD HH-MM-SS” (string) or as YYYYMMDDHHMMSS.uuuuuu (numeric).
The MySQL CURTIME() function returns the current time as “HH-MM-SS” (string) or as HHMMSS.uuuuuu (numeric).
The MySQL DATE() function extracts the date part from a datetime expression.
The MySQL DATEDIFF() function returns the number of days between two date values.
The MySQL DATE_ADD() function adds a time/date interval to a date and then returns the date.
The MySQL DATE_SUB() function subtracts a time/date interval from a date and then returns the date.
The MySQL DAY() function returns the day of the month for a given date (a number from 1 to 31).
The MySQL DAYNAME() function returns the weekday name for a given date.
The MySQL DAYOFMONTH() function returns the day of the month for a given date (a number from 1 to 31).
The MySQL DAYOFWEEK() function returns the weekday index for a given date (a number from 1 – Sunday to 7 – Saturday).
The MySQL DAYOFYEAR() function returns the day of the year for a given date (a number from 1 to 366).
The MySQL FROM_DAYS() function returns a date from a numeric datevalue.
The MySQL HOUR() function returns the hour part for a given date (from 0 to 838).