programming-examples/python/Date/Convert a string date to the timestamp.py

6 lines
150 B
Python
Raw Normal View History

2019-11-15 12:59:38 +01:00
import time
import datetime
s = "01/10/2016"
print()
print(time.mktime(datetime.datetime.strptime(s, "%d/%m/%Y").timetuple()))
print()