Answers for "python datetime drop seconds"

1

python datetime to timestamp

import datetime
now = datetime.datetime.today()
timestamp = datetime.datetime.timestamp(now)
Posted by: Guest on January-26-2021
0

python print datetime

import datetime
print("Now:", datetime.datetime.now())
Posted by: Guest on August-23-2020

Python Answers by Framework

Browse Popular Code Answers by Language