Java/Oracle/mySQL 日期格式

Java:

yyyy-MM-dd HH:mm:ss.SSS

 

Oracel:

yyyy-MM-dd HH24:mi:ss

select * from to_pub_report  where  report_time>=str_to_date('2019-07-31 14:39:41' ,'yyyy-MM-dd HH24:mi:ss')

 

MySQL

%Y-%m-%d %H:%i:%S

date_format(createdDate,'%Y-%m-%d')

方式一:
select * from to_pub_report  where  report_time>='2019-07-31 14:39:41'
方式二:
select * from to_pub_report  where  report_time>=str_to_date('2019-07-31 14:39:41' ,'%Y-%m-%d %H:%i:%S')

 

posted @ 2019-07-31 18:27  zhaoyanhao  阅读(271)  评论(0编辑  收藏  举报