Přejít na obsah
Menu
You need to be registered to interact with the community.
This question has been flagged
1 Odpovědět
371 Zobrazení


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
Zrušit
Nejlepší odpověď

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
Zrušit
Related Posts Odpovědi Zobrazení Aktivita
2
kvě 22
34160
0
bře 19
4189
0
led 19
5255
4
úno 24
12511
0
led 18
4032