Mega Code Archive

 
Categories / MySQL / Date Time
 

Date Symbols in DATE_FORMAT, TIME_FORMAT, and FROM_UNIXTIME

%W             day of week Monday to Sunday %a             day of week abbreviated Mon to Sun %e             day of month 1 to 31 %d             day of month two-digit 01 to 31 %D             day of month with ending 1st, 2nd, 3rd, 4th, ... %w             day of week as number 0 (Sunday) to 6 (Saturday) %j             day in year, three-digit 001 to 366 %U             week number, two-digit (Sunday) 00 to 52 %u             week number, two-digit (Monday) 00 to 52 %M             name of month January to December %b             name of month abbreviated Jan to Dec %c             month number 1 to i %m             month number, two-digit 01 to 12 %Y             year, four-digit 2002, 2003, ... %y             year, two-digit 00, 01, ... %%             the symbol % %