Overslaan naar inhoud
Menu
Je moet geregistreerd zijn om te kunnen communiceren met de community.
Deze vraag is gerapporteerd
1 Beantwoorden
3217 Weergaven

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

Thanks

Avatar
Annuleer
Beste antwoord

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
Annuleer
Auteur

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

Gerelateerde posts Antwoorden Weergaven Activiteit
2
nov. 22
3632
1
jul. 22
2247
3
nov. 21
25865
1
aug. 15
5372
2
mrt. 15
5277