Python Practice Example 95

Python 100例Python 100 Examples

Problem:Convert string date into a readable date format.

Program analysis:None.

Program source code:

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

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

The output of the above example is:

2015-08-28 00:00:00

Python 100例Python 100 Examples

Other Extensions