MYSQL get current date and date format
Get system Date: Now ()
Format Date: date_format (date, format)
Note: Date: Time field
Format: Date formats
Back to system date, output 2009-12-25 14:38:59
Select Now ();
Output 09-12-25
Select Date_format (now (), '%y-%m-%d ');
Format date values according to the format string:
% S,%s two-bit numeric form of seconds (00,01, ...,
%I,%I Two-bit digital form (00,01, ...,)
%H Two-digit hours, 24 hours (00,01, ...,)
%H two digits Word form of the hour, 12 hours (01,02, ...,)
%k Digital form of hours, 24 hours (0,1, ...,)
%l Digital form of hours, 12 hours (1, 2, ...,)
%T 24 Hours of time form (hh:m M:SS)
%r 12-hour time (hh:mm:ss AM or hh:mm:ss pm)
%p am or PM
%w the name of each day of the week (Sunday, Monday, ..., Saturday)
%a each week Abbreviation for the name of the day (Sun, Mon, ..., Sat)
%d two digits indicates the number of days in the month (,...,)
%e The number of days in the month (1, 2, ...,)
%d The English suffix represents the number of days in the month (1st, 2nd, 3rd,...
%w The number of days in the week (0 = Sunday, 1=monday, ..., 6=saturday)
%j Three-digit number of days in the year (001, 002, ..., 366)
%u weeks (0, 1, 52), Where Sunday is the first day of the week
%u week (0, 1, 52), where Monday is the first day of the week
%m month name (January, February, ..., December)
%b abbreviated month name (January, Fe Bruary,...., December)
The month (1, 2, ...,)
%Y Four-digit year
%Y two-digit year (s) of the month (S.,., ...,)
that is represented by the two-digit number br>% Direct value "%"