Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I am very new to Qlik. I am not sure if this has been discussed before but the searching I have done does not seem to provide an adequate solution.
This is my script that connects to an ODBC MSSQL DB.
--ON RELOAD POP UP FREE TEXT INPUT BOX FOR START DATE AND END DATE
ODBC CONNECT TO ZDD (XUserId is KVMMdCBPULZEHXFMMTUKGYdNSDdKVZVMSDEA, XPassword is ZZTBZadKHLbIXbZGZRMIM);
LET vStartDate=INPUT('ENTER START DATE AND TIME (YYYY-MM-DD HH:MM:SS)','INPUT BOX');
LET vEndDate=INPUT('ENTER END DATE AND TIME (YYYY-MM-DD HH:MM:SS)','INPUT BOX');
SQL EXECUTE spRptQlikUnpackBudget '$(vStartDate)','$(vEndDate)'
This all works as intended (prompting user with 2 free text fields for start date and end date) however to make it a little more user friendly I'd like to replace the free text field input box with a calendar object where the start date must start from the beginning of the day (i.e. 2017-12-27 00:00:00) and the end date must finish at the end of that day (i.e. 2017-12-28 23:59:59).
TL;DR
How do I go about presenting the user with a start date (including time 00:00:00) and end date (including time 23:59:59) calendar object pop up when the script is reloaded rather than a free text field input box?
**If including the time is problematic then having the time hardcoded (somehow?) into each variable is not a problem.
May be this?
vStart = Timestamp('2017-12-27', 'DD-MM-YYYY hh:mm:ss')
vEnd = TimeStamp(MonthEnd(Date(Floor('2017-12-27'))),'DD-MM-YYYY hh:mm:ss')
Unfortunately this does not work.
To reiterate, I need the input box to be replaced by a calendar object (date picker) that is passed to my StartDate and EndDate SQL parameters which will allow the user to select a start date and end date via calendar rather than typing it into a free text field input box.
And I need this Calendar Object to popup when the script is loaded/reloaded.
Hi
May be u can try this..
=GetCurrentSelections(Start_Date) in one textbox
=GetCurrentSelections(End_Date) in other textbox
whenever you select tht start date, it will be shown in textbox..
Hi Sivesh,
Will this prompt the user for input on Reload?
Hi
put those variables of v_Startdate and v_end date in a textbox to show values.. It will show the dates after reload