Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
1 Odpowiedz
3219 Widoki

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

Thanks

Awatar
Odrzuć
Najlepsza odpowiedź

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

Awatar
Odrzuć
Autor

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

Powiązane posty Odpowiedzi Widoki Czynność
2
lis 22
3632
1
lip 22
2247
3
lis 21
25867
1
sie 15
5372
2
mar 15
5277