Mysql date and character conversion date_format (date, '% Y-% m-% D') --------------> to_char () in oracle; str_to_date (date, '% Y-% m-% D') --------------> to_date () in oracle; www.2cto.com % Y: indicates the 4-digit year % y: indicates the 2-digit year % m: represents the month, in the format of (01 ...... 12) % c: represents the month, in the format of (1 ...... 12) % d: represents the number of days in the month, in the format of (00 ...... 31) % e: represents the number of days in the month, in the format of (0 ...... 31) % H: represents the hour, in the format of (00 ...... 23) % k: represents the hour, in the format of (0 ...... 23) % h: represents the hour, in the format of (01 ...... 12) % I: represents the hour, in the format of (01 ...... 12) % l: represents the hour, in the format of (1 ...... 12) % I: represents the minute, in the format of (00 ...... 59) % r: represents the time, in the format of 12 hours (hh: mm: ss [AP] M) % T: represents the time, in the format of 24 hours (hh: mm: ss)