-1
我有一个日期字段ref_event_times
。 end_date
和一个时间字段ref_event_times
。 end_time
我的表 “ref_event_times” ......来自CONCAT的STR_TO_DATE
我试图工会,作为一个日期时间字段 “END_DATE_TIME” ...... 使用遵循
STR_TO_DATE('CONCAT(`ref_event_times`.`end_date`,' ',`ref_event_times`.`end_time`)','%m/%d/%Y %H:%i') AS `end_date_time`
返回NULL ...
在哪里是错误的?
尝试'STR_TO_DATE(CONCAT( ref_event_times.end_date,'',ref_event_times.end_time),'%m /%d /%Y%H:%i')'这一个 –
尝试这个我检查了它的WO RKING select STR_TO_DATE(CONCAT(current_date,'',current_time),'%Y-%m-%d%H:%i:%s'); – JYoThI
STR_TO_DATE(CONCAT('ref_event_times'.''end_date','','','ref_event_times'.'end_time'),'%Y-%m-%d%H:%i:%s') 最终需要' Y-%m-%d%H:%i:%s' More thanks –