Skip to main content

Evening i am looking for SQL help with my quick report. I’m pulling a date column in which i am truncating to split out the time. I want to create a selection box for the user to put a from and to date allowing a range to be displayed.

 

Would it be easier to pull a single selection box which the user can use the between dates function?

i’m starting with

AND TRUNC(PROMISED_DELIVERY_DATE) BETWEEN DATE '2023-06-22' AND DATE '2024-06-22'

But i need to make the user select the required dates

@Fentiger79 have you tried the sintax as per below post?

 

 


no i need to give the user a selection box where they can input a date range 


Hi ​@Fentiger79 ,

Please refer below query:

SELECT *
  FROM CUSTOMER_INFO T
 WHERE T.CREATION_DATE BETWEEN TO_DATE('&from_date', 'dd/mm/yyyy') AND
       TO_DATE('&to_date', 'dd/mm/yyyy')

System would ask user input.

 

Regards

Abdul Rehman


Thank you that appears to work


Reply