I\'m currently having an issue with Python. I have a Pandas DataFrame and one of the columns is a string with a date. The format is :
\"%Y-%m-%d %H:%m
I know this is old but I believe the cleanest way is this:
int(pd.Timestamp("20200918 20:30:05").value/1000000)
Gives 1600461005000 which is the epoch of the date above. The .value attribute is the number of nanoseconds since epoch so we divide by 1e6 to get to milliseconds. Divide by 1e9 if you want epoch in seconds.