How to set input parameter as _current_date in dashboard designer?

Hi Helical,

I have created a report with some input parameter like date and time, now I would like to convert that date to current date, please help me in this.

Hello Harika,

To convert to_date to current_date dynamically you have to use the below JS code.
Open the dashboard where you have your input parameters as a date and you want to convert it to current date, click on the OBJECTS which is in Developer Mode, then select Dashboard Component, double-click custom option you will get an option to add the javascript code use the below code.

Custom Script:

var d = new Date;
var dformat = d.getFullYear()+"-"+(d.getMonth()+1)+"-"+d.getDate()+" 00:00PM";
Dashboard.setVariable("endDate",dformat);

In this case “endDate” is my filter name which I want as a current date.
todate-currentdate

Save and refresh the cache you see the result.