1

Trying to cover python general value to datetime object to plot. Facing ValueError. Please educate.

import xlrd
from datetime import datetime
each = 0.945927384259   # coming from reading cell value from Excel
date_value = xlrd.xldate_as_tuple(each, xl_workbook.datemode)
    print datetime(*date_value) 

it throws an error saying ValueError: year is out of range

maulik mehta
  • 185
  • 2
  • 3
  • 10
  • 1
    This has been answered previously: http://stackoverflow.com/questions/1108428/how-do-i-read-a-date-in-excel-format-in-python http://stackoverflow.com/questions/17685191/python-excel-date-time-read-in-issue – Michael Robellard Apr 29 '16 at 01:32

0 Answers0