Using `current_date` in Supabase JS
# help-and-questions
z
Is it possible to use below query in supabase JS select * from visas where current_date - country_arrival_date >= 30;
g
Turn it around so you do .lt('country_arrival_date', JScalculated30daysago). Or something along those lines.
z
I mean current_date MINUS (-) country_arrival_date >= 30;
g
Either way you just need to do the fixed math (current_date and 30) and compare that properly against country_arrival_date column.
You can't do math on the column itself in the API. But you should be able to get a formula that works. You can always call and rpc function and do the SQL if you prefer.