Can we setup dates under variable drop-down?

Hi ,

I have one SQL query which needs to be executed on daliy basis by changing the date in the query…

Can you please confirm , how can I setup the “DATE” variable drop-down ?

I dnt want to edit query everytime , thanks.

This is one way but I recommend you use a real calendar table

select  concat(dateadd(dd, 0, cast(getdate() as date)),'') as DateChoice 
union
select distinct  top 100000  
  concat(dateadd(dd, a.column_id, cast(getdate() as date)),'') 
  from sys.all_columns a 
  cross JOIN sys.all_columns b order by 1

Thanks for your responce… Can you please confirm how can use the real calander

Really outside the scope of grafana and more into SQL but might want to look at something like following