ofxparse icon indicating copy to clipboard operation
ofxparse copied to clipboard

[medium] Parse dates in %d%m%y format

Open diogomendonca opened this issue 11 years ago • 1 comments

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.

diogomendonca avatar Oct 10 '13 12:10 diogomendonca

Thanks for the report Diogo. I'll leave this report open in case anyone would like to try fixing the issue.

jseutter avatar Jul 07 '16 02:07 jseutter