Passing of From and To Time range in query

Hi Guys ,
I am writing query in panel so ,I wanted to pass my time like this -
time between (From)__timeTo()-24h and (To)__timeTo().or in other words i want only To selected date with 24 Hours of data . so whatever is selected in TO date time range with that time i need 24Hours of data only in my graph.
I hope am able to make it clear. because i saw on grafana(Global variables | Grafana Labs) we can pass now-7h this but whatever am trying its giving me error.