Technology · Reference dataset

MySQL Date Functions

MySQL date and time functions with a description, the documented syntax, a documented example with its result, and a link to the MySQL Reference Manual.

$69 once covers this and 398 other datasets, plus 33 collections, for 365 days. No automatic renewal. Have a pass?

Look inside

Preview the records

First 5 and last 5 of 50 records · Last changed November 15, 2026

Preview of MySQL Date Functions
Function Description Syntax Example Result Doc url
ADDDATE Adds a time/date interval to a date and then returns the date ADDDATE(date,INTERVAL expr unit) SELECT ADDDATE('2008-01-02', 31); 2008-02-02 https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html
ADDTIME Adds a time interval to a time/datetime and then returns the time/datetime ADDTIME(expr1,expr2) SELECT ADDTIME('2007-12-31 23:59:59.999999', '1 1:1:1.000002'); 2008-01-02 01:01:01.000001 https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html
CURDATE Returns the current date CURDATE() SELECT CURDATE(); 2008-06-13 https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html
CURRENT_DATE Returns the current date CURRENT_DATE, CURRENT_DATE() https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html
CURRENT_TIME Returns the current time CURRENT_TIME, CURRENT_TIME([fsp]) https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html
40 more records · Download options
WEEK Returns the week number for a given date WEEK(date[,mode]) SELECT WEEK('2008-02-20'); 7 https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html
WEEKDAY Returns the weekday number for a given date WEEKDAY(date) SELECT WEEKDAY('2008-02-03 22:23:00'); 6 https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html
WEEKOFYEAR Returns the week number for a given date WEEKOFYEAR(date) SELECT WEEKOFYEAR('2008-02-20'); 8 https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html
YEAR Returns the year part for a given date YEAR(date) SELECT YEAR('1987-01-01'); 1987 https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html
YEARWEEK Returns the year and week number for a given date YEARWEEK(date) SELECT YEARWEEK('1987-01-01'); 198652 https://dev.mysql.com/doc/refman/8.4/en/date-and-time-functions.html

Open the sample in a free tool: CSV to JSON · JSON formatter · SQL INSERT generator · CSV to XML

CSV / JSON / XML

Put this data to work.

All 50 records, in your choice of format.

The free sample stops at 10 rows. A Data Pass removes the limit here and across the site, so you can stop collecting data and start using it.

  • Every record in 399 datasets, this one included
  • All 33 collections in full: more than 4 million rows of ZIP codes, schools, occupations and more
  • CSV, JSON and XML, whole-category ZIPs, and 2,500 API requests a day
Get a Data Pass

$69 once, for 365 days. No subscription and no automatic renewal, and what you download is yours to keep using.

Your key arrives by email after payment. Use it here to download the complete file.

Or share what you build with it and, if approved, get 75% off a Data Pass. See the contributor program

Already have a pass?

Your key is used for this request and is not saved by this page.

Commercial use is allowed, free or paid.

Downloaded a CSV? Convert CSV to JSON, generate SQL inserts, remove duplicate lines, or sort a list with the free tools.

Scope and sources

Last checked against sources: October 15, 2026.

Last changed: November 15, 2026. This is when we last changed the data or its description. It doesn’t mean the data runs up to that date.

MySQL Date Functions has 50 records and 6 fields: Function, Description, Syntax, Example, Result, Doc url.

A complete download includes all 50 records currently held in this dataset. Check the description and sources to decide whether its scope fits your project.

Use this dataset through the API
GET https://mysafeinfo.com/api/data/mysqldatefunctions

Choose a format, sort, or request fewer rows. A pass key gives access to the complete dataset. See the examples and parameters.

Without a pass, sorting and randomization apply only to the fixed 10-row sample.

More in Technology

HTML Colors Microsoft Access Date Functions Microsoft Access Numeric Functions Microsoft Access Utility Functions Microsoft Access String Functions MySQL Advanced Functions

Download a category with your pass