[BangPypers] date/time difference between two dates

Anand Balachandran Pillai abpillai at gmail.com
Thu Feb 19 15:12:55 CET 2009


On Thu, Feb 19, 2009 at 5:00 PM, Anand Chitipothu <anandology at gmail.com> wrote:
>> Not just these functions, but almost the entire time/datetime
>> functions mimic their C counterparts.
>
> I always find datetime module very painful to deal with.
> May be it is because it has borrowed too much from C instead of being pythonic.
>
> Just give one example:
>
>>>> import datetime
>>>> t = datetime.datetime.utcnow().isoformat()
>>>> t
> '2009-02-19T11:26:28.750579'
>
> Is there any easy way to convert this iso-formatted date string back
> to datetime?

http://blog.redinnovation.com/2008/06/30/relativity-of-time-shortcomings-in-python-datetime-and-workaround/

I always felt datetime/date modules were a hack and still
continue to use "time" for all my date/datetime needs :)

If you want something better I suggest the egenix mxDateTime
module.

> _______________________________________________
> BangPypers mailing list
> BangPypers at python.org
> http://mail.python.org/mailman/listinfo/bangpypers
>



-- 
-Anand


More information about the BangPypers mailing list