MySQL Date Functions
Technology 50 records updated 2020-01-27
MySQL Date Functions, with function, and description.
Get this data
GET https://mysafeinfo.com/api/data/mysqldatefunctions
Sort, page, randomize, and download with query parameters; see the documentation.
Preview
First 25 of 50 records. Click a column to sort these rows.
| Function | Description | ID |
|---|---|---|
| ADDDATE | Adds a time/date interval to a date and then returns the date | 1 |
| ADDTIME | Adds a time interval to a time/datetime and then returns the time/datetime | 2 |
| CURDATE | Returns the current date | 3 |
| CURRENT_DATE | Returns the current date | 4 |
| CURRENT_TIME | Returns the current time | 5 |
| CURRENT_TIMESTAMP | Returns the current date and time | 6 |
| CURTIME | Returns the current time | 7 |
| DATE | Extracts the date part from a datetime expression | 8 |
| DATEDIFF | Returns the number of days between two date values | 9 |
| DATE_ADD | Adds a time/date interval to a date and then returns the date | 10 |
| DATE_FORMAT | Formats a date | 11 |
| DATE_SUB | Subtracts a time/date interval from a date and then returns the date | 12 |
| DAY | Returns the day of the month for a given date | 13 |
| DAYNAME | Returns the weekday name for a given date | 14 |
| DAYOFMONTH | Returns the day of the month for a given date | 15 |
| DAYOFWEEK | Returns the weekday index for a given date | 16 |
| DAYOFYEAR | Returns the day of the year for a given date | 17 |
| EXTRACT | Extracts a part from a given date | 18 |
| FROM_DAYS | Returns a date from a numeric datevalue | 19 |
| HOUR | Returns the hour part for a given date | 20 |
| LAST_DAY | Extracts the last day of the month for a given date | 21 |
| LOCALTIME | Returns the current date and time | 22 |
| LOCALTIMESTAMP | Returns the current date and time | 23 |
| MAKEDATE | Creates and returns a date based on a year and a number of days value | 24 |
| MAKETIME | Creates and returns a time based on an hour, minute, and second value | 25 |
Notes
- Last updated on January 27, 2020.