
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Different Time Format Characters in MySQL DATE_FORMAT Function
Different time format characters used by MySQL DATE_FORMAT() function are as follows −
Time Format Character |
Meaning |
---|---|
%H |
It is used to abbreviate Hour on a 24-hour clock in two digits format like 00, 01, 02 up to 23. |
%h |
It is used to abbreviate Hour on 12-hour clock in two digits format like 01, 02 up to 12. |
%i |
It is used to abbreviate minutes in two digits format like 01, 02 up to 59. |
%l |
It is used to abbreviate Hour on 12-hour clock in two digits format without zero-like 01, 02 up to 12. |
%p |
It is used for A.M or P.M. |
%r |
It is used to display time on 12-hour clock as HH:MM:SS. |
%s |
It is used to abbreviate seconds in two digits format like 01, 02 up to 59. |
%T |
It is used to display time on the 24-hour clock as HH:MM:SS. |
%f |
It is used to display Microseconds in the range of 000000..999999. |
Advertisements