Extracting date from a field filter

Hi,

I am currently working on a Metabase dashboard that allows a user to select a month and year filter to be used as a field filter. The purpose is to view the number of hours worked for that specific month. I was wondering if it is possible to extract the data from a field filter in order to display the selected month and the corresponding hours worked in a table. I have tried using CAST, but unfortunately, I have had no luck. I have come to the conclusion that I may need to use a date filter instead, which is not ideal since I wanted the option to select specific months rather than a range of dates. Here is an example of my code:

select
    cast({{month}} as date),
    sum(hours) 
from 
    table 
where 
    {{month}}

That’s not currently possible. There were some posts around that in the forum some time ago, but only workarounds