sorting date-strings of form: Wed, 05 Jan 2000 10:07:02

Oleg Broytmann phd at phd.pp.ru
Thu Dec 14 08:50:57 EST 2000


On Thu, 14 Dec 2000, Jorn Verwey wrote:
> I have a document with a lot of sections which need to be ordered by date. The date is given in the
> format given in the subject: Wed, 05 Jan 2000 10:07:02. How would I go about? Being a novice I would
> rather not re-invent the wheel (it will end up square). I took notice of two packages which might
> help me (mxDateTime and normalDate), but it didn't seem straight forward. I welcome suggestions!
> TIA.

   I would recommend use mxDateTime the following way: convert all date
strings to DateTime objetcs, and sort a list of such objects. DateTime
objects has all neccessary features.

Oleg.
----
     Oleg Broytmann            http://phd.pp.ru/            phd at phd.pp.ru
           Programmers don't die, they just GOSUB without RETURN.





More information about the Python-list mailing list