Standard way to express a date in a real number?

sdhyok sdhyok at yahoo.com
Mon Apr 14 15:31:59 EDT 2003


I am looking for a way to express a date in a real number
in Python.

For instance, in MatLab,
n = datenum(2001,12,19,18,0,0) returns n = 731204.75.

This kind of expression turned out to be very helpful
when handling or storing dates.

Is there any funtion for the purpose in Python (e.g. in datetime module)?

Daehyok Shin




More information about the Python-list mailing list