1 2 3 4 | def excel_date(value):
value = float(value) - 2
edate = datetime.datetime(year=1900,month=1,day=1)
return edate + datetime.timedelta(days=value)
|
More like this
- datetime.time/datetime.datetime to Unix Epoch (with microsecond support) by sleepycal 3 years, 1 month ago
- Querying datetime aware objects in your local timezone by jayliew 1 year ago
- Choices by cronosa 3 years, 5 months ago
- Converting a Flickr Datetime to a Python Datetime by obeattie 6 years, 3 months ago
- UTC DateTime field by ludo 5 years, 9 months ago
Comments
You could explain input and output values. Example?
#