Excel Date

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

  1. Excel Export with xlwt by sspross 3 years, 6 months ago
  2. date range by mackenzie_kearl 6 years, 2 months ago
  3. UnicodeWriter and UnicodeDictWriter - write unicode strings out to Excel compatible CSV files by simon 5 years, 8 months ago
  4. Generic admin action to export data into excel/csv by vinay.chittora 8 months, 3 weeks ago
  5. Human format Date representation by sachingupta006 2 years, 1 month ago

Comments

pakalk (on April 15, 2010):

You could explain input and output values. Example?

#

(Forgotten your password?)