Pandas to_datetime
import pandas as pd
import time
datas = ['2017-01-05', 'Jan 5, 2017', '01/05/2017', '2017.01.05', '2017/01/05','20170105']
datas=pd.to_datetime(datas)
print(datas)
datas=['2017-01-05', 'Jan 5, 2017', '01/05/2017', '2017.01.05', '2017/01/05','20170105','abc']
print(pd.to_datetime(datas,errors='raise')
print(pd.to_datetime(datas,errors='ignore'))
print(pd.to_datetime(datas,errors='coerce'))
datas='01-05-2020'
print(pd.to_datetime(datas,dayfirst=True))
print(pd.to_datetime(datas,format='%d-%m-%Y'))
t=1551966534
print(pd.to_datetime(t,unit='s'))
s=pd.to_datetime(t,unit='s')
print(time.mktime(time.strptime(str(s),"%Y-%m-%d %H:%M:%S")))