How to Get the Current Date in MySQL Database: MySQL Operators: CURDATE() Problem: You’d like to get the current date in MySQL. Solution: Use the SELECT CURDATE() function. Here’s the query: SELECT CURDATE(); Here’s the result of the query: 2021-03-03 Discussion: Simply use the CURDATE() function to get the current date. The date can be displayed in two different formats: ‘YYYY-MM-DD' if it is used in a string context or YYYYMMDD if it is used in a numeric context. What does it mean to be used in a string or numeric context? Let’s see an example of a query in a string context: SELECT CURDATE(); And the result: 2021-03-03 An example of a query in a numeric context: SELECT CURDATE() + 0; Which will result in: 20210303 There are two other functions that can be used instead of CURDATE(): CURRENT_DATE and CURRENT_DATE(). All three are synonyms; that is, you can choose any of them and the result will be the same. Recommended courses: SQL Basics Standard SQL Functions SQL Practice Set Recommended articles: 18 Useful Important SQL Functions to Learn ASAP Performing Calculations on Date- and Time-Related Values How Often Employees Are Running Late for Work: SQL Datetime and Interval SQL Arithmetic See also: How to Get the Current Date and Time in MySQL How to Find the Number of Days Between Two Dates in MySQL How to Find the Last Day of the Month for a Given Date in MySQL How to Change Seconds to a Time Value in MySQL How to Change Datetime Formats in MySQL Subscribe to our newsletter Join our monthly newsletter to be notified about the latest posts. Email address How Do You Write a SELECT Statement in SQL? What Is a Foreign Key in SQL? Enumerate and Explain All the Basic Elements of an SQL Query