Mysql oracle Time Operation example select alarmid, alarmtype, dttimestamp from hdralarmbase20130320 where dttimestamp> to_date ('2017-3-20 10:12:28 ', 'yyyy-mm-dd hh24: mi: ss') Similar usage of mysql SELECT alarmid, alarmtype, dttimestamp FROM hdralarmbase20130129 WHERE dttimestamp <STR_TO_DATE ('2017-01-29 13:33:19 ', '% Y-% m-% d % t') date_format (date,' % Y-% m-% D') --------------> to_char (); str_to_date (date, '% Y -% M-% D') --------------> to_date () in oracle; usage in mysql: str_to_date ('2017-05-01 23:59:59 ', '% Y-% m-% d % t') % Y: indicates the 4-digit year % y: indicates the year of 2.% m: indicates the month. The format is (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) % S: Second. Format: (00 ...... 59) % s: represents the second, in the format of (00 ...... 59)