Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Replace input box with calendar object (on reload script)

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.

5 Replies
Anil_Babu_Samineni

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')

Please add me Anil_Babu_Samineni to interact faster when reply back. Speak low think High.

Before develop something, think If placed (The Right information | To the right people | At the Right time | In the Right place | With the Right context)
Anonymous
Not applicable
Author

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.

  1. Your solution hard codes the date.
  2. Your solution errors on reload script with Error converting data type varchar to datetime.
shiveshsingh
Master
Master

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..

Anonymous
Not applicable
Author

Hi Sivesh,

Will this prompt the user for input on Reload?

shiveshsingh
Master
Master

Hi

put those variables of v_Startdate and v_end date in a textbox to show values.. It will show the dates after reload