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


I am trying to use date objects.

And i want to extract the month from this field.

Please who can help me i need it please.

Avatar
Opusti
Best Answer

from datetime import datetime

from openerp.tools import DEFAULT_SERVER_DATE_FORMAT

......

month = date_field and datetime.strptime(date_field, DEFAULT_SERVER_DATE_FORMAT).month

......

Avatar
Opusti
Related Posts Odgovori Prikazi Aktivnost
2
maj 22
33851
0
mar. 19
4014
0
jan. 19
5040
4
feb. 24
12258
0
jan. 18
3908