Query records from 2023 to 2024

Hey everyone, hope you are doing good. I had to query records with date ranges using this approach ๐Ÿ‘‡๐Ÿผ

2024 just showed me this is not a valid logic when querying 2 different years. Now it is obvious that this only works when from_date and to_date have the same year.

Do you have any idea of a simple way to manage different years? Thanks!

14 replies