Skip to Content
मेन्यू
This question has been flagged
1 Reply
3626 Views

I need to extract month from invoice_date as a custom Character or selection field (NO DATE).

Thanks

Avatar
Discard
Best Answer

Hi,

Please try like this:- 

import datetime
month = datetime.strptime(self.date_invoice, '%Y-%m-%d').strftime("%B")

It will return the month name.

Regards

Avatar
Discard
Author

I forgot to comment that I would like to do it in the frontend, directly in the web as a custom field x_MONTH. And in the model invoice.account.report

Related Posts Replies Views Activity
2
नव॰ 22
4112
1
जुल॰ 22
2616
3
नव॰ 21
26490
1
अग॰ 15
5815
2
मार्च 15
5277