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: Query to display the current date in the following format

MySQL Date Time: Exercise-12 with Solution

Write a query to display the current date in the following format.
Sample output : Thursday 4th September 2014 00:00:00

Code:

SELECT date_format(CURDATE(),'%W %D %M %Y %T');

Sample Output:

date_format(CURDATE(),'%W %D %M %Y %T')
Wednesday 30th August 2017 :00:00

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

Previous:Write a query to get the first name and hire date from employees table where hire date between '1987-06-01' and '1987-07-30'.
Next:Write a query to display the current date in a specified format.

What is the difficulty level of this exercise?