hledger icon indicating copy to clipboard operation
hledger copied to clipboard

csv: unclear date parsing error when you forget to skip the header

Open simonmichael opened this issue 3 years ago • 0 comments

From #1831:

The same confusing error arises when a newbie (like me) forgets to skip the csv header line. Code does not notice that is trying to parse "Transaction Date" as a date. It would be nice if a suggestion was offered to add the skip. I kept on trying to find the right date format to use instead of realizing "duh, you forgot to skip!!" :)

+1 In my case the 1st column of the CSV is "Date", and so the error I was getting is: hledger: error: could not parse "Date" as a date using date format "YYYY/M/D", "YYYY-M-D" or "YYYY.M.D" I took this error as if the tool was properly reading the "Date" but somehow not understanding the format If the first column of the CSV had been something different the error would have been obvious though...

simonmichael avatar Apr 26 '22 20:04 simonmichael