Pular para o conteúdo
Menu
Esta pergunta foi sinalizada
1 Responder
389 Visualizações


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
Cancelar
Melhor resposta

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
Cancelar
Publicações relacionadas Respostas Visualizações Atividade
2
mai. 22
34164
0
mar. 19
4194
0
jan. 19
5264
4
fev. 24
12517
0
jan. 18
4036