Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

django time cualtulate

from datetime import timedelta

@property
def duration(self):
    end = timedelta(self.endtime.hour, self.endtime.minute, self.endtime.second)
    start = timedelta(self.starttime.hour, self.starttime.minute, self.starttime.second)
    return end - start
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #django #time #cualtulate
ADD COMMENT
Topic
Name
3+2 =