Found another way : >>> print emptylist [((u'Name', u'DOB'),), ((u'C R RAMESH', <PyTime:7/13/1961 12:00:00 AM>),), ((u'G SIVA RAMA KRISHNAIAH', <PyTime:7/1/1964 12:00:00 AM>),)] >>> v=emptylist[1][0] >>> v (u'C R RAMESH', <PyTime:7/13/1961 12:00:00 AM>) >>> v_date=v[1].Format().split()[0] >>> print v_date 07/13/61
Tim Golden-4 wrote: > > SantoshMohan wrote: >> Hi, >> >> I am writing a script to read date from xls file. >> >> Output is like this: >> >>>>> emptylist >> [((u'Name', u'DOB'),), ((u'C R RAMESH', <PyTime:7/13/1961 12:00:00 >> AM>),), >> ((u'G SIVA RAMA KRISHNAIAH', <PyTime:7/1/1964 12:00:00 AM>),)] >> >>>>> emptylist[1] >> ((u'C R RAMESH', <PyTime:7/13/1961 12:00:00 AM>),) >> >>>>> value >> ((u'C R RAMESH', <PyTime:7/13/1961 12:00:00 AM>),) >>>>> value[0][1] >> <PyTime:7/13/1961 12:00:00 AM> >> >> How to read the date and Time? > > http://timgolden.me.uk/python/win32_how_do_i/use-a-pytime-value.html > > TJG > _______________________________________________ > python-win32 mailing list > python-win32@python.org > http://mail.python.org/mailman/listinfo/python-win32 > > -- View this message in context: http://www.nabble.com/Reading-date-from-PYTime-tp23614659p23632681.html Sent from the Python - python-win32 mailing list archive at Nabble.com. _______________________________________________ python-win32 mailing list python-win32@python.org http://mail.python.org/mailman/listinfo/python-win32