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

Nick Gaens mail at nickgaens.com
Tue Feb 15 10:49:07 GMT 2011


This can be easily achieved by doing the math yourself.

Something like:

months = (now.year() - joiningDate.year()) * 12
> months += now.month() - joiningDate.month()


Wkr,


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
>



-- 
Nick Gaens
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.riverbankcomputing.com/pipermail/pyqt/attachments/20110215/566802b6/attachment.html>


More information about the PyQt mailing list