MySQL defaults to displaying columns of type DATETIME
using the format yyyy-MM-dd HH:mm:ss
. Does this format have a name, such as the RFC 1123 format? How pervasive is this format among database vendors?
An example of a date value displayed in this format would be:
2013-05-13 12:58:26
The default date format shows as YYYY-MM-DD.
In SQL Server, regardless of data type and language, those are yyyy-MM-ddThh:mm:ss. nnnnnnn and yyyyMMdd .
MySQL recognizes DATE values in these formats: As a string in either ' YYYY-MM-DD ' or ' YY-MM-DD ' format. A “relaxed” syntax is permitted: Any punctuation character may be used as the delimiter between date parts. For example, '2012-12-31' , '2012/12/31' , '2012^12^31' , and '2012@12@31' are equivalent.
MySQL DATE_FORMAT() Function The DATE_FORMAT() function formats a date as specified.
It's commonly known as ISO 8601 format.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With