Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
269 Vizualizări


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.

Imagine profil
Abandonează
Cel mai bun răspuns

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

......

Imagine profil
Abandonează
Related Posts Răspunsuri Vizualizări Activitate
2
mai 22
33851
0
mar. 19
4014
0
ian. 19
5040
4
feb. 24
12258
0
ian. 18
3908