Python的time,datetime,string相互转换
#把datetime转成字符串def datetime_toString(dt): return dt.strftime("%Y-%m-%d-%H")#把字符串转成datetimedef string_toDatetime(string): return datetime.strptime(string, "%Y-%m-%d-%H")#把字...