ofxparse
ofxparse copied to clipboard
[medium] Parse dates in %d%m%y format
The HSBC Brasil ofx file parse fail because BANKTRANLIST :: DTSTART tag is in %d%m%y format.
The error happens on ofxparse.py line 396. I fixed locally by changing to this code:
try:
return datetime.datetime.strptime(
ofxDateTime[:8], '%Y%m%d') - timeZoneOffset
except:
return datetime.datetime.strptime(
ofxDateTime[:6], '%d%m%y') - timeZoneOffset
I don't know if is right fix that way, but i want to share this problem.
Tks,
Diogo.
Thanks for the report Diogo. I'll leave this report open in case anyone would like to try fixing the issue.