Skip to Content
Meniu
Trebuie să fiți înregistrat pentru a interacționa cu comunitatea.
Această întrebare a fost marcată
1 Răspunde
388 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
34164
0
mar. 19
4194
0
ian. 19
5264
4
feb. 24
12517
0
ian. 18
4036