ability to pick dates

There is a requirement for the user to be able to select date/dates.It use to be used in a SQL query and have that query execute. How would I do this?
I am thinking of the below workflow.

Example Query:

select
*
from
table
where
Date1 >= user_input_date1
AND
Date2<=user_input_date2

So before the Database reader node containing this query is executed, a pop up box would prompt the user to enter/select a date and the date would replace the “user_input_date”. after this, the node would execute.

“Quickforms and Wrapped Metanodes” should be able to help you although I am nit an expert:

https://www.knime.com/knime-introductory-course/chapter7/section1/quickforms-and-wrapped-metanodes

2 Likes

Hi,
QuickForm nodes are a bit outdated. Nowadays we use configuration nodes for the AP and Widgets for the WebPortal. If your user uses the workflow in the Analytics Platform, wrap the Date&Time Configuration in a component and pass the selected value as a flow variable to the database node. The user can then configure the component by picking a date.
Kind regards
Alexander

3 Likes

Yes the users will be using the Analytics platform. However, I was thinking a more user friendly form style like a pop up form or something.

Also I tried what @AlexanderFillbrunn suggested the data base node is throwing an error “got number format expected date”.

Hi,
that may be because the node outputs the date as a string. You may have to convert it into a date within SQL.
Kind regards
Alexander

2 Likes

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.