Please note, this is a STATIC archive of website www.w3resource.com from 19 Jul 2022, cach3.com does not collect or store any user information, there is no "phishing" involved.
w3resource

MySQL Date and Time Exercises: Display the current date in the specified format

MySQL Date Time: Exercise-13 with Solution

Write a query to display the current date in a given format.
Sample output : 05/09/2014

Code:

SELECT date_format(CURDATE(),'%d/%m/%Y');

Sample Output:

date_format(CURDATE(),'%d/%m/%Y')
11/08/2017

 

MySQL Code Editor:

Have another way to solve this solution? Contribute your code (and comments) through Disqus.

Previous:Write a query to display the current date in the spacific format.
Next:Write a query to display the current date in the specified format.

What is the difficulty level of this exercise?