Re: How to get last day of month in BQL

2024-05-29 Thread Chary Chary
Dan, this is great, thanks! On Wednesday, May 29, 2024 at 10:06:05 PM UTC+2 dan...@grinta.net wrote: > On 29/05/24 10:59, Chary Chary wrote: > > Looks like you need to ask for a new function to be added to the > > beanquery, something like MONTH_END_DATE(year, month). In addition also > >

Re: How to get last day of month in BQL

2024-05-29 Thread Daniele Nicolodi
On 29/05/24 10:59, Chary Chary wrote: Looks like you need to ask for a new function to be added to the beanquery, something like MONTH_END_DATE(year, month). In addition also QUATER_END_DATE  (year, month) would be useful. Andreas contributed support for date_truc() and interval() and I

Re: How to get last day of month in BQL

2024-05-29 Thread Daniele Nicolodi
On 29/05/24 04:10, 'francocalvo' via Beancount wrote: I know this won't solve your issue. What I've done in the past was to read the data to a Pandas DataFrame, and aggregate and query it using DuckDB How do you make Pandas and DuckDB work with fixed decimals and with amounts in different

Re: How to get last day of month in BQL

2024-05-29 Thread Chary Chary
Looks like you need to ask for a new function to be added to the beanquery, something like MONTH_END_DATE(year, month). In addition also QUATER_END_DATE (year, month) would be useful. Looking at the code of the similar functions

Re: How to get last day of month in BQL

2024-05-28 Thread 'francocalvo' via Beancount
I know this won't solve your issue. What I've done in the past was to read the data to a Pandas DataFrame, and aggregate and query it using DuckDB On Sunday, March 17, 2024 at 10:12:30 PM UTC-3 and...@gerstmayr.me wrote: > > Hi! > > > > I'm trying to get a report of the market value of my

Re: How to get last day of month in BQL

2024-03-17 Thread Andreas Gerstmayr
Hi! I'm trying to get a report of the market value of my assets at the end of each month:     SELECT year, month,     CONVERT(LAST(balance),   'USD', DATE_ADD(DATE(year, month+1, 1), -1)) AS market_value,     CONVERT(COST(LAST(balance)), 'USD', DATE_ADD(DATE(year, month+1, 1), -1))

How to get last day of month in BQL

2024-03-17 Thread Andreas Gerstmayr
Hi! I'm trying to get a report of the market value of my assets at the end of each month: SELECT year, month, CONVERT(LAST(balance), 'USD', DATE_ADD(DATE(year, month+1, 1), -1)) AS market_value, CONVERT(COST(LAST(balance)), 'USD', DATE_ADD(DATE(year, month+1, 1), -1)) AS