Skip to Content
Menu
This question has been flagged
1 Atsakyti
3317 Rodiniai

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

Thanks

Portretas
Atmesti
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

Portretas
Atmesti
Autorius

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 Rodiniai Veikla
2
lapkr. 22
3743
1
liep. 22
2345
3
lapkr. 21
25988
1
rugp. 15
5519
2
kov. 15
5277