Errors Importing OFX v2.2 Files Due to Date Format
I cannot import OFX files from my credit union. I traced the issue to the date format they use, which includes microseconds.
Example:
<DTPOSTED>20250131120000.000 GMT</DTPOSTED>
If I remove the '.000', the file import works fine.
I have verified that the OFX 2.2 specification (https://financialdataexchange.org/common/Uploaded%20files/OFX%20fil...), section 3.2.8, allows for microseconds in the format.
Here is an excerpt from my console:
20250217-14:40:14.460 Invalid date tag: 20250216123953.757 GMT
20250217-14:40:14.460 Invalid date tag: 20250216123953.757 GMT
Had a bad date ('20250131120000.000 GMT') in OFX tag 'DTEND': java.lang.NumberFormatException: For input string: "000 GMT"
20250217-14:40:14.461 Ignoring extraneous OFX tag: <DTSTART>20230226120000.000 GMT
20250217-14:40:14.461 Ignoring extraneous OFX tag: <DTEND>20250131120000.000 GMT
20250217-14:40:14.462 Invalid date tag: 20250131120000.000 GMT
20250217-14:40:14.462 Invalid date tag: 20250131120000.000 GMT
20250217-14:40:14.462 Invalid date tag: 20241231120000.000 GMT
As a workaround, I use this windows batch file to remove the microseconds from a file that is passed to it. This allows me to drag-and-drop a OFX (or QFX) file onto the FixDates.bat file, resulting in a new OFX file, with '_fixed' appended to the name. Note that this is a quick and dirty method that works for me; your mileage may differ. It does assume the file uses and specifies GMT.
FixDates.bat:
powershell -Command "(gc %~dpnx1) -replace '\.\d{3} GMT', ' GMT' | Out-File -encoding ASCII %~dpn1_fixed%~x1"
Keyboard shortcuts
Generic
? | Show this help |
---|---|
ESC | Blurs the current field |
Comment Form
r | Focus the comment reply box |
---|---|
^ + ↩ | Submit the comment |
You can use Command ⌘
instead of Control ^
on Mac
1 Posted by Chris Darling on 18 Feb, 2025 01:39 AM
A slight correction: The original file does import without a visible error (other than in the console), however, all of the transactions have a date of '00/00/0000'.
2 Posted by Stuart Beesley ... on 19 Feb, 2025 02:00 PM
FYI - I’m led to believe by IK that the issue is the time zone after the .microseconds, and also that a fix for this has been made ready for the next alpha.
Support Staff 3 Posted by Sean Reilly on 19 Feb, 2025 02:27 PM
Yes, a fix for this will be available as an alpha shortly (build 5253 from https://infinitekind.com/prepreview), a preview release shortly after (from https://infinitekind.com/preview ), and I hope a stable release of 2024.4 by the end of the week.
Thanks for pointing this out!
Sean
--
Sean Reilly
Developer, The Infinite Kind
https://infinitekind.com
4 Posted by Chris Darling on 22 Feb, 2025 06:48 PM
Just installed 2024.4 and confirm the issue is resolved. Great Service!
Thanks.