Odoo Help

0

How to get last day of month in openerp?

By
Mohammed Khamis
on 5/3/15, 9:01 AM 1,628 views

I do not know how to get Last day of specific month . please I need helping  you to me for that .

Thank you for you .

0
Baiju KS
On 5/3/15, 1:34 PM

Hi,

first you have to import calender

and you can use monthrange() method.

monthrange(year, month)
    Returns weekday of first day of the month and number of days in month, for the specified year and month. 

for getting the last day of a month you can use this script:-

calendar.monthrange(year, month)[1] 


Hope this helps..........

0
sameer alhwety
On 5/4/15, 2:56 AM
from calender import monthrange
from datetime import date
mdays = monthrange(year,month)[1]
date2 = date(year,month,mdays)

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

Register

Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

1 follower(s)

Stats

Asked: 5/3/15, 9:01 AM
Seen: 1628 times
Last updated: 5/4/15, 3:02 AM