1、timestamp类型转换:
保留到"秒"一级
timeStr = "11/27/2013 9:04:34 AM" sql = "insert into gcic_t_csv_data(MeasurementStartTime) values( timestamp '%s')"%timeStr2、to_date类型转换
保留到"天"一级
timeStr = "11/27/2013 9:04:34 AM" sql2 = "insert into gcic_t_csv_data(MeasurementStartTime) values( to_date( '%s','MM/DD/YYYY'))"%timeStr原文链接:https://www.f2er.com/postgresql/195922.html