def excel_date(value): value = float(value) - 2 edate = datetime.datetime(year=1900,month=1,day=1) return edate + datetime.timedelta(days=value)