Skip to Content
मेन्यू
This question has been flagged
1 Reply
260 Views


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
Discard
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
Discard
Related Posts Replies Views Activity
2
मई 22
33847
0
मार्च 19
4008
0
जन॰ 19
5037
4
फ़र॰ 24
12248
0
जन॰ 18
3903