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
3392 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
3826
1
lip 22
2397
3
lis 21
26062
1
sie 15
5544
2
mar 15
5277