Add month/day/year to parse
Some fields come with this format timestamp rather than ISO format. Change-Id: I9e361a97f4ba42da6b0aab0ac4d9ae126a58c255
This commit is contained in:
@@ -56,4 +56,8 @@ def parse_time(timeval):
|
|||||||
return datetime.strptime(timeval, '%Y-%m-%d')
|
return datetime.strptime(timeval, '%Y-%m-%d')
|
||||||
except ValueError:
|
except ValueError:
|
||||||
pass
|
pass
|
||||||
|
try:
|
||||||
|
return datetime.strptime(timeval, '%m/%d/%Y')
|
||||||
|
except ValueError:
|
||||||
|
pass
|
||||||
return None
|
return None
|
||||||
Reference in New Issue
Block a user