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?
- New Content published on w3resource:
- HTML-CSS Practical: Exercises, Practice, Solution
- Java Regular Expression: Exercises, Practice, Solution
- Scala Programming Exercises, Practice, Solution
- Python Itertools exercises
- Python Numpy exercises
- Python GeoPy Package exercises
- Python Pandas exercises
- Python nltk exercises
- Python BeautifulSoup exercises
- Form Template
- Composer - PHP Package Manager
- PHPUnit - PHP Testing
- Laravel - PHP Framework
- Angular - JavaScript Framework
- Vue - JavaScript Framework
- Jest - JavaScript Testing Framework