[PyQt] Fwd: How to convert days to year,month & days

KONTRA, Gergely pihentagy at gmail.com
Mon Feb 21 18:15:21 GMT 2011


Why not use datetime.timedelta?

[interactive console]
>>> import datetime
>>> a = datetime.datetime.now()
>>> b = datetime.datetime.now()
>>> b-a
datetime.timedelta(0, 5, 156000)


+-[ Gergely Kontra <pihentagy at gmail.com> ]------------------+
|                                                           |
| Mobile:(+36 20)356 9656                                   |
|                                                           |
+- "Olyan lángész vagyok, hogy poroltóval kellene járnom!" -+



On Mon, Feb 14, 2011 at 18:46, alhad deshpande <alhaddeshpande at gmail.com> wrote:
> i have a date of joining of an employee and i want to know till current date
> how many MONTHS he/she has worked in the company..
>
> Can someone plz guide me how can i convert days to MONTHS for above
> requirement..
>
> Thanx
> ad3d
> _______________________________________________
> PyQt mailing list    PyQt at riverbankcomputing.com
> http://www.riverbankcomputing.com/mailman/listinfo/pyqt
>


More information about the PyQt mailing list