SQL Table Date to Date

I created a table to showcase some values and would like to filter out data based on two Drop down menu’s which will allow user to see data from a given day to another given day. The drop down menu’s have 1-31 for days. Here is my SQL Query

SELECT Flow, Level, t_stamp FROM testing WHERE t_stamp BETWEEN “'2018-6-” + {Root Container.Dropdown 1.selectedValue} + " 00:00:00’" AND “'2018-6-” + {Root Container.Dropdown 3.selectedValue} + " 23:59:00’"

and

SELECT Flow, Level, t_stamp FROM testing WHERE t_stamp BETWEEN “'2018-6-” + ‘{Root Container.Dropdown 1.selectedValue}’ + " 00:00:00’" AND “'2018-6-” + ‘{Root Container.Dropdown 3.selectedValue}’ + " 23:59:00’"

This does nothing, but if I take out the dropdown menu’s like this:
SELECT Flow, Level, t_stamp FROM testing WHERE t_stamp BETWEEN ‘2018-6-12 00:00:00’ AND ‘2018-6-12 23:59:00’

it works

Any thoughts?

Just use single quotes. Here’s an example I just tested:

SELECT top 10 *
FROM AUDIT_EVENTS
WHERE EVENT_TIMESTAMP > '2018-6-' + '{Root Container.Dropdown.selectedValue}' + ' 00:00:00'

did the between function work for you, using single quotes with the between function doesnt seem to work with me.

Yes, just changed my example to BETWEEN and it worked as expected.

is there a better way of looking at data between two different dates? I cannot seem to get thsi query to filter out corrrectly.

Yes, using Calendar controls.

Post your updated code. It's gotta be close.

SELECT Flow, Level, t_stamp
FROM testing
WHERE t_stamp
BETWEEN ‘2018-6-’+’{Root Container.Dropdown 1.selectedValue}’+’ 12:00:00’ AND ‘2018-6-12 14:59:00’

What is the value and type of Root Container.Dropdown 1.selectedValue? Are you receiving any sort of error?

Values are 1-16. No no errors. I am currently trying the calenders and having more success. Code looks correct though, yeah?

What if you try using the .selectedStringValue property of the dropdown? I suspect there is some problem with integers and strings be combined.