Skip to content

Commit

Permalink
Merge pull request #245 from AfricasVoices/csv-to-rapid-pro-new-datet…
Browse files Browse the repository at this point in the history
…ime-format

Handle another new date format in recovery CSVs.
  • Loading branch information
as2388 authored Oct 27, 2022
2 parents 077b480 + b8cfde6 commit e3a9bf6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/csv_to_engagement_db/csv_to_engagement_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ def _parse_date_string(date_string, timezone):
"""
# Try parsing using a list of all the variants we've seen for expressing timestamps.
for date_format in ["%d/%m/%Y %H:%M", "%d/%m/%Y %H:%M:%S", "%d/%m/%Y %H:%M:%S.%f", "%Y/%m/%d %H:%M:%S.%f",
"%Y/%m/%d %H:%M:%S"]:
"%Y/%m/%d %H:%M:%S", "%Y-%m-%d %H:%M:%S"]:
try:
parsed_raw_date = datetime.strptime(date_string, date_format)
break
Expand Down

0 comments on commit e3a9bf6

Please sign in to comment.