[Python] Operare con datetime

Lawrence Oluyede l.oluyede a gmail.com
Lun 9 Feb 2009 14:32:12 CET


2009/2/9 Marco Mariani <marco.mariani a prometeia.it>:
> michele a nectarine.it wrote:
>
>> Ora vorrei passare dalla stringa [09/Feb/2009:10:49:30] ad un formato
>> gestito da datetime, in modo da poter fare sottrazioni tra date.
>>
>> Mi sapreste indicare come?
>>
>
> time.strptime()

Aggiungo anche il parser di dateutil che e` molto flessibile:
http://labix.org/python-dateutil#head-a23e8ae0a661d77b89dfb3476f85b26f0b30349c

-- 
Lawrence, http://oluyede.org - http://twitter.com/lawrenceoluyede
"It is difficult to get a man to understand
something when his salary depends on not
understanding it" - Upton Sinclair


Maggiori informazioni sulla lista Python