Answers for "seconds to year date python datetime"

1

how to convert days into seconds in python using time.time()

days = input("Number of daysn")
seconds = days * 24 * 60 * 60 # your answer :)
print(seconds) # you can check this by printing, if you want...
Posted by: Guest on September-10-2021
1

python datetime to seconds

from datetime import datetime
dt = datetime.today()  # Get timezone naive now
seconds = dt.timestamp()
Posted by: Guest on April-07-2021

Python Answers by Framework

Browse Popular Code Answers by Language