programming-examples/python/Date/Convert a string date to the timestamp.py
2019-11-15 12:59:38 +01:00

6 lines
150 B
Python

import time
import datetime
s = "01/10/2016"
print()
print(time.mktime(datetime.datetime.strptime(s, "%d/%m/%Y").timetuple()))
print()