Time Range on link URL (new dashboard)

I use a trick to pass period to next dashboard, if you use a link through the dashboard you have the option to keep the date period selected (time range), but if you want to use a link in the table view you can pass the period as a parameter to the dashboard. I use SQL Server query so i put in select two columms dt_ini and dt_fim and hidden in style and use to mount link with parameters from and to and works.

Add this in select: REPLACE(REPLACE(REPLACE(CONVERT(VARCHAR(19), __timeFrom(), 120),'-',''),'T',' '),':','') AS dt_ini, REPLACE(REPLACE(REPLACE(CONVERT(VARCHAR(19), __timeTo(), 120),’-’,’’),‘T’,’ ‘),’:’,’’) AS dt_fim

Output: YYYYMMDD HHMMSS

link: ./d/Il8yeMuik/motivos-gic-canais?orgId=1&var-motivo=${__cell}&var-canal=canal&from={__cell_10}&to=${__cell_11}

The way I’m doing it works, but is there another way to do it (less labor)?

Thanks