import datetime, time millisecond = datetime.datetime.now() print(time.mktime(millisecond.timetuple()) * 1000)