Hi Mike,

I have put the following into my .ledgerrc:

--input-date-format %d/%m/%Y
--date-format %d.%m.%Y

and then you can just run:
ledger reg -f test2.txt
on your example.

Martin

Am 07.03.2011 um 12:00 schrieb Michael Strecke:

> Hi,
> 
> I'm new to Ledger, so perhaps I missed something. I searched the group
> archive but didn't find any solution.
> 
> My problem is the German date format: %d.%m.%Y
> 
> An example transaction looks like this:
> 
> 15.03.2006 Exxon
>    Expenses:Auto:Gas          10,00 €
>    Liabilities:MasterCard    -10,00 €
> 
> I changed the input-date-format accordingly, but I get an error:
> 
> $ ledger --input-date-format '%d.%m.%Y' reg -f test2.txt
> While parsing file "test2.txt", line 1:
> While parsing transaction:
>> 15.03.2006 Exxon
> Error: Year is out of valid range: 1400..10000
> 
> Further tests showed, that I can use any other separation character
> 15#03#2006, 15,03,2006 - with the input format modified accordingly -
> except ".".
> 
> The error message suggests, that Ledger isn't trying to parse a date,
> but a number.
> 
> Any other switches that I have missed?
> 
> (FYI: Ledger 3.0.0-20100623, current Beta version, compiled on Ubuntu)
> 
> Thanks
> 
> Mike

Reply via email to