Registered Member
|
I just about have a complete account file from MS Money to line up with a KMM export. Here is the QIF export settings ..
Date format: %m/%d/%yyyy Apostrophe handling: 2000-2009 However, dates from MS Money 'loose' QIF export D2/24'2005 D3/3'2005 and the dates from a KMM export, using the export settings above. D02/24/2005 D03/03/2005 so MS Money is stripping leading zeros and I have no control over that. I need to somehow tweak the KMM QIF export settings to also strip leading zeros. Also I need to find out how to 'force' the apostrophe from a KMM export. The QIF export is a plugin, so maybe I need to find out how to modify that. I'm already running 5.1.2, so the file at https://altlinux.pkgs.org/p10/classic-x ... 4.rpm.html may not be an update ??
Currently running Kubuntu 22.04, Plasma 5.24.4, Frameworks 5.92.0, Qt 5.15.3, kernel 5.15.0-46-generic (64-bit), GeForce 840M Graphics
|
Registered Member
|
So it would appear that the KMyMoney QIF export has a bug, as the apostrophe was not included in the date format.
Currently running Kubuntu 22.04, Plasma 5.24.4, Frameworks 5.92.0, Qt 5.15.3, kernel 5.15.0-46-generic (64-bit), GeForce 840M Graphics
|
Registered Member
|
I do not fully understand the post, but perhaps this will be useful. I think these two lines are not formatted correctly:
D2/24'2005 D3/3'2005 These two lines are formatted correctly: D02/24/2005 D03/03/2005 Using regular expressions in a text editor would convert the incorrect lines to the correct format: For Month Find what: D([1-9])/ Replace with: D0\1/ For Day Find what: /([1-9])' Replace with: /0\1' Find what: /([0-9]{2,2})' Replace with: /\1/
Last edited by Stephen Leibowitz on Fri Oct 28, 2022 4:59 pm, edited 1 time in total.
|
KDE Developer
|
No, it's not a bug because the apostrophe itself is only a workaround to differentiate the century when only two-digit year information is used. KMyMoney provides 4 digits for the year and therefore doesn't need the apostrophe in this context.
ipwizard, proud to be a member of the KMyMoney forum since its beginning.
openSuSE Leap 15.4 64bit, KF5 |
Registered Member
|
Yes, correct.
I tried all of those in Kate, a search/replace, but the 'find' didn't find anything. Some test data at https://pastebin.com/raw/FnueXARj There are a number of Python solutions at https://python-forum.io/thread-38549.html
Currently running Kubuntu 22.04, Plasma 5.24.4, Frameworks 5.92.0, Qt 5.15.3, kernel 5.15.0-46-generic (64-bit), GeForce 840M Graphics
|
Registered Member
|
Possibly "Bug" was too strong a word , and a perceived "limitation" of the QIF export plugin would be more appropriate ? Meaning the plugin has no provision to span a century. That said, I just exported from an account that spans a century and the QIF data looks fine. So, the "Apostrophe Handling" did nothing in that export, because AFAIK the KMM (XML) data stores 4 digit year. Hmm, ..so the "Apostrophe Handling" is only for imports I guess.
Oh yes, .. I should have kept reading...
Currently running Kubuntu 22.04, Plasma 5.24.4, Frameworks 5.92.0, Qt 5.15.3, kernel 5.15.0-46-generic (64-bit), GeForce 840M Graphics
|
Registered Member
|
You have to “Enable regular expressions” in Kate by clicking the {} icon. Also, use Replace Checked. The three operations should be done in the order shown in my post: Month, Day, and “apostrophe” (third search/replace).
The Day regular expression did not find any matches in the pastebin test data, because that data already had two digits for the day field in each of the entries. But in the first post of this topic, the second example had only one digit: “D3/3'2005”. My Day regular expression corrects that, by inserting a leading zero. |
Registered Member
|
I didn't know Kate can do that. All the examples you provided worked on another file, thanks. No doubt there is a method to use those 3 regex's in Python; I see
for example. And only do the regex on the "D" records.
Currently running Kubuntu 22.04, Plasma 5.24.4, Frameworks 5.92.0, Qt 5.15.3, kernel 5.15.0-46-generic (64-bit), GeForce 840M Graphics
|
Registered users: bartoloni, Bing [Bot], Google [Bot], Sogou [Bot], Yahoo [Bot]