On Mon, Oct 5, 2009 at 4:54 PM, Stef Mientki <span dir="ltr"><<a href="mailto:stef.mientki@gmail.com">stef.mientki@gmail.com</a>></span> wrote:<br><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">

hello,<br>
<br>
I want to handle datetime vars in a general way, so I use the default time-format,<br>
so I can use the standard cinversion procedures.<br></blockquote><div><br></div><div>Personally, I love mx.DateTime; its the best date/time library around. But, Python's built in datetime isn't too bad and is similar and built-in if you don't want to use a third-party library.</div>

<div><br></div><div>But:</div><div><br></div><div><div>>>> birthday = mx.DateTime.Date(1960,3,3)</div><div>>>> birthday</div><div><mx.DateTime.DateTime object for '1960-03-03 00:00:00.00' at 6211e0></div>

<div>>>> age = mx.DateTime.now() - birthday</div><div>>>> print "Age in days", age.days</div><div>18113.722499758693</div><div>>>> print "Age in years", age.days / 365</div>
<div>
49.626636985640253</div><div><br></div><div>I really can't quite fathom why you'd want to use something so low-level as time.mktime... or just about anything in the time module :) If you want to handle dates in a general way, I'd use one of the general-purpose date/time handling libraries. They're far more capable and easier to use.</div>

<div><br></div><div>HTH,</div><div><br></div><div>--S</div><div><br></div><div><br></div></div></div>