Answers for "days to years python"

5

python calc days between dates

from datetime import date

d0 = date(2008, 8, 18)
d1 = date(2008, 9, 26)
delta = d1 - d0
print(delta.days)
Posted by: Guest on June-24-2020
1

datetime date of 10 years ago python

import datetime
datetime.datetime.now() - datetime.timedelta(days=3*365)
Posted by: Guest on September-16-2021
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

Code answers related to "days to years python"

Python Answers by Framework

Browse Popular Code Answers by Language