python中date、datetime、string的相互转换string转datetimedatetime转stringdatetime转时间戳时间戳转stringdate转datetime
import datetimeimport timestring转datetimestr = '2012-11-19'date_time = datetime.datetime.strptime(str,'%Y-%m-%d')date_timedatetime.datetime(2012,11,19,0,0)datetime转string