openpyxl.utils.datetime module

class openpyxl.utils.datetime.GMT[source]

Bases: datetime.tzinfo

dst(dt)[source]

datetime -> DST offset in minutes east of UTC.

tzname(dt)[source]

datetime -> string name of time zone.

utcoffset(dt)[source]

datetime -> timedelta showing offset from UTC, negative values indicating West of UTC

openpyxl.utils.datetime.days_to_time(value)[source]
openpyxl.utils.datetime.from_ISO8601(formatted_string)[source]

Convert from a timestamp string to a datetime object. According to 18.17.4 in the specification the following ISO 8601 formats are supported.

Dates B.1.1 and B.2.1 Times B.1.2 and B.2.2 Datetimes B.1.3 and B.2.3

There is no concept of timedeltas

openpyxl.utils.datetime.from_excel(value, offset=2415018.5)[source]
openpyxl.utils.datetime.time_to_days(value)[source]

Convert a time value to fractions of day

openpyxl.utils.datetime.timedelta_to_days(value)[source]

Convert a timedelta value to fractions of a day

openpyxl.utils.datetime.to_ISO8601(dt)[source]

Convert from a datetime to a timestamp string.

openpyxl.utils.datetime.to_excel(dt, offset=2415018.5)[source]