1.字符串转日期
str_to_date('2008-4-2 15:3:28','%Y-%m-%d %H:%i:%s');
WHERE t1.created_date >= str_to_date(#{date},'%Y-%m-%d %H:%i:%s')
2.日期转字符串
select date_format(now(),'%Y-%m-%d %h:%i:%s');
1.字符串转日期
str_to_date('2008-4-2 15:3:28','%Y-%m-%d %H:%i:%s');
WHERE t1.created_date >= str_to_date(#{date},'%Y-%m-%d %H:%i:%s')
2.日期转字符串
select date_format(now(),'%Y-%m-%d %h:%i:%s');