Damon Abdiel
unread,Oct 12, 2023, 2:14:29 PM10/12/23Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to hle...@googlegroups.com
Hello
I have this rules for Import CSV:
```
skip 1
separator ,
fields Type,Status,Date,Payee,Category/Account,Amount,Note,Memo,Tags,Number,Security,Shares,Price/Share,Commission
description %Payee
comment %Memo
currency BRL
amount %Amount
account2 Expenses:%4
date-format %-d/%-m/%y
```
I try to migrate my data from Banktivity to hledger
I export my data from Banktivity and some transactions have splits, see:
```
Type,Status,Date,Payee,Category/Account,Amount,Note,Memo,Tags,Number,Security,Shares,Price/Share,Commission
Withdrawal,*,03/10/23,Booking.com,Laura,"-6.833,65",,,,,,"","",""
Withdrawal,*,02/10/23,MOBILEPAG TIT 2650434570,(split),"150,00",MOBILEPAG TIT 2650434570,,,20231002005,,"","",""
,"","","",Itau,"6.833,02",,,
,"","","",Pai 9144 Personnalite,"-6.364,39",,,
,"","","",Web 0967 Personnalite,"-269,91",,,
,"","","",Eve 7025 Personnalite,"-875,08",,,
,"","","",Temp Personnalite,"826,36",,,
```
On line 4 I get an error:
```
hledger: Error: error: could not parse "" as a date using date format "%-d/%-m/%y"
CSV record: "","","","","Itau","6.833,02","","",""
the date rule is: %3
the date-format is: %-d/%-m/%y
you may need to change your date rule, change your date-format rule, or change your skip rule
for m/d/y or d/m/y dates, use date-format %-m/%-d/%Y or date-format %-d/%-m/%Y
```
I tried skipping this invalid date, I put this in my new rules files:
```
...
if [%2 = '']
skip
...
```
But she skipped all the lines :(
Someone let me know where my error is here.
Damon Abdiel
-----
Sent from macOS Big Sur