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?
- 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