Skip to Content
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odgovori
3253 Prikazi

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

Thanks

Avatar
Opusti
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
Opusti
Avtor

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 Odgovori Prikazi Aktivnost
2
nov. 22
3656
1
jul. 22
2273
3
nov. 21
25915
1
avg. 15
5416
2
mar. 15
5277