BrewwQL filter for "Last month"

Hi Luke,

Is there any chance you could add this primitive to Brewwql? I’d love to do this:

credit_note.status = “Finalised” and credit_note.issue_date = “last month” or something similar rather than have to specify the ranges like I do now.

Cheers,

David.

Hi David. I’ve moved your request to a new thread to avoid confusing the original feature request.

Unfortunately, this isn’t possible. BrewwQL date filtering is always based on a specific date. “Last month” isn’t a specific date; it’s a date range (e.g. 1st March to 31st March).

You should be able to use something like this instead:

credit_note.status = "Finalised" and credit_note.issue_date >= "first of last month" and credit_note.issue_date < "last of last month"

Cheers.

Hi Luke,

I know there is an alternate way to write it, it’s just something I use in queries so often (last month, last year) that it would be a nice shortcut to stick in there that BrewwQL would automatically expand into “the right thing”.

David.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.