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. datetime.time/datetime.datetime to Unix Epoch (with microsecond support) by sleepycal 3 years ago
  2. Querying datetime aware objects in your local timezone by jayliew 11 months, 3 weeks ago
  3. Choices by cronosa 3 years, 4 months ago
  4. Converting a Flickr Datetime to a Python Datetime by obeattie 6 years, 2 months ago
  5. UTC DateTime field by ludo 5 years, 8 months ago

Comments

pakalk (on April 15, 2010):

You could explain input and output values. Example?

#

(Forgotten your password?)