Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

python timedelta get days with fraction

from datetime import timedelta

def get_days_between(datePast, dateFuture):
   difference = dateFuture - datePast
   return difference.total_seconds() / timedelta(days=1).total_seconds()
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #python #timedelta #days #fraction
ADD COMMENT
Topic
Name
3+9 =