On 26/05/2022 20:26, Philippe Dumonet wrote:

query> select first(date), account, sum(position) where currency != 'EUR' AND date <= #'26-05-2021' GROUP BY account, currency

By the way, I advise against using the #'26-05-2021' format to specify dates, especially if you use a day-month-year date format: it does not do what you expect if the day number is less than 13 as it defaults to the month-day-year date format.

The #'...' date literals are so confusing that I'll most probably remove support for them from beanquery in the near future.

bean-query understands date literals in the YYYY-MM-DD format, in this example, you can simply write:

SELECT first(date), account, sum(position)
WHERE currency != 'EUR' AND date <= 2021-05-26
GROUP BY account, currency

Cheers,
Dan

--
You received this message because you are subscribed to the Google Groups 
"Beancount" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beancount/487cb7d0-ccf8-a618-3eb4-25dac95eac17%40grinta.net.

Reply via email to