Knowledge Keywords:
Date_formatSelect Date_format (create_time, '%y%u ') weeks,count (Caseid) count from Tc_case Group by weeks; Select Date_format (create_time, '%y%m%d ') days,count (Caseid) count from Tc_case Group by days; Select Date_format (create_time, '%y%m ') months,count (Caseid) count from Tc_case group by months; Date_format (Date,format)
Formats the date value according to the format string. The following modifiers can be used in the format string: %m month name (January ... December) %w week name (Sunday ... Saturday) %d The date of the month with English prefixes (1st, 2nd, 3rd, etc.). ) %y year, number, 4 www.2cto.com %y year, number, 2-digit %a abbreviated week name (Sun ... Sat) %d number of days in the month, number (00 ... %e number of days in the month, number (0 ... %m months, numbers (01 ... %c month, number (1 ...) %b abbreviated month name (Jan ... DEC) %j Days of the year (001 ... 366) %h hours (00 ... %k hours (0 ...) %h hours (01 ...) %i) Hours (01 ... %l hours (1 ...) %i minutes, Numbers (00 ...) %r time, 12 hours (Hh:mm:ss [ap]m) %t time, 24 hours (HH:MM:SS) %s seconds (00 ... %s seconds (00 ...) %p am or pm %w one days of the week (0=sunday ... 6=saturday) %u Week (0 ... 52), here Sunday is the first day of the Week %u week (0 ... 52), here Monday is the first day of the week %% a writing "%".