Skip to content

Instantly share code, notes, and snippets.

@dittore
dittore / datetime_parser.py
Created October 19, 2012 08:50
Parse input into YYYY-MM-DD HH:MM:SS (PYTHON)
def parse_datetime(d):
"""
Datetime parser
Creates datetimes from input into format yyyy-mm-dd hh:mm:ss
Needs proper validation!
Should accept following:
yyyy