Вопрос по python – Конвертировать формат даты Python

6

Error: User Rate Limit Exceeded

Ваш Ответ

3   ответа
6

strptimestrftime:

>>> import datetime
>>> datetime.datetime.strptime('5/10/1955', '%d/%m/%Y').strftime('%Y-%m-%d')
'1955-10-05'
Error: User Rate Limit Exceeded
12

Error: User Rate Limit ExceededError: User Rate Limit Exceeded:

In [1]: import datetime

In [2]: datetime.datetime.strptime('10/05/2012', '%d/%m/%Y').strftime('%Y-%m-%d')
Out[2]: '2012-05-10'

Error: User Rate Limit ExceededError: User Rate Limit Exceeded:

{{ mydate|date:"Y-m-d" }}

Error: User Rate Limit Exceeded

0

Error: User Rate Limit ExceededError: User Rate Limit ExceededError: User Rate Limit Exceeded

import date_converter
my_datetime = date_converter.string_to_string('02/05/2012', '%d/%m/%Y', '%Y-%m-%d')

Похожие вопросы