Quantcast
Channel: Jack @ ASP.NET » Python
Viewing all articles
Browse latest Browse all 8

convert string to datetime in python

$
0
0
from datetime import datetime date_object = datetime.strptime(‘Jun 1 2012  1:33PM’, ‘%b %d %Y %I:%M%p’) notes, the ‘format’ of the datetime string must match the string need to converted to datetime.

Viewing all articles
Browse latest Browse all 8

Trending Articles