Balance sheet of multiple, non contiguous montsh

6 views
Skip to first unread message

LucaBH

unread,
Dec 6, 2022, 9:55:20 AM12/6/22
to hledger
Hi.
Easy question, maybe trivial, but I'm not able to find a solution by myself.

I'd like to compare the balance sheet of two, non contiguous months, say for instance two November of 2021 and 2022. To do so, I'd like to issue a single bs command that shows these two months side by side. I played with the format of the date query with no success.
There's a way to get there?

Thank you, regards
Luca

Simon Michael

unread,
Dec 6, 2022, 11:35:49 AM12/6/22
to hledger
How about this:

$ hledger -f examples/bcexample.hledger bs -p 'every november 3rd from 2015-11-02 to 2016-11-03' cur:USD
Balance Sheet 2015-11-02..2016-11-02

                            ||  2015-11-02   2016-11-02 
============================++==========================
 Assets                     ||                          
----------------------------++--------------------------
 Assets:US:BofA:Checking    ||  596.05 USD   596.05 USD 
 Assets:US:ETrade:Cash      || 5120.50 USD  5120.50 USD 
 Assets:US:Vanguard:Cash    ||   -0.02 USD    -0.02 USD 
----------------------------++--------------------------
                            || 5716.53 USD  5716.53 USD 
============================++==========================
 Liabilities                ||                          
----------------------------++--------------------------
 Liabilities:US:Chase:Slate || 2891.85 USD  2891.85 USD 
----------------------------++--------------------------
                            || 2891.85 USD  2891.85 USD 
============================++==========================
 Net:                       || 2824.68 USD  2824.68 USD 

LucaBH

unread,
Dec 6, 2022, 1:37:41 PM12/6/22
to hledger
Ouch! Thank you Simon, I was suspecting I didn't played enough with the date query.
Luca
Reply all
Reply to author
Forward
0 new messages