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

6 lines
159 B
Python

import datetime
import time
dt = datetime.datetime(2016, 2, 25, 23, 23)
print()
print("Unix Timestamp: ",(time.mktime(dt.timetuple())))
print()