Latest web development tutorials

Python incluye ejercicios 95

Python 100 Li Python 100 Li

Título: Fecha de cadena en un formato de fecha legible.

Análisis del programa: Ninguno.

Código fuente:

#!/usr/bin/python
# -*- coding: UTF-8 -*-

from dateutil import parser
dt = parser.parse("Aug 28 2015 12:00AM")
print dt

La salida del ejemplo anterior es:

2015-08-28 00:00:00

Python 100 Li Python 100 Li