日期格式化成字符串:
select date_format(now(), '%Y-%m-%d %H:%i:%s') now from dual;
结果:
字符串转成日期:
select str_to_date('2021-12-19 10:12:35', '%Y-%m-%d %H:%i:%s') now from dual;
结果:
日期格式化成字符串:
select date_format(now(), '%Y-%m-%d %H:%i:%s') now from dual;
结果:
字符串转成日期:
select str_to_date('2021-12-19 10:12:35', '%Y-%m-%d %H:%i:%s') now from dual;
结果: