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


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.

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

......

Portretas
Atmesti
Related Posts Replies Rodiniai Veikla
2
geg. 22
33929
0
kov. 19
4049
0
saus. 19
5100
4
vas. 24
12321
0
saus. 18
3955