5alid.ps Posted January 30, 2019 Share Posted January 30, 2019 Hello,I tried to print report with specific date condition.I have table that contains an column called 'START_DATETIME' which contains date and time like (30/01/2019 13:50:00) .In Jasper report sql query, I wrote this select statement :SELECT TO_DATE(START_DATETIME,'DD/MM/YYYY') FROM APPOINTMENTWHERE TO_DATE(START_DATETIME,'DD/MM/YYYY') = '30/01/2019'[/code]when run the select it does not return data.I try to run select without where condition, it return :2019-01-30 00:00:00.0[/code]I run the same select in SQL Navigator it works fine and return date with specific format I put in to_date function. Link to comment Share on other sites More sharing options...
hozawa Posted February 4, 2019 Share Posted February 4, 2019 TO_DATE convert a string to a DATE. It seems like you're comparing DATE with a string if your WHERE clause.Check the following thread in slackoverflow on comparing dates in JasperReports.https://stackoverflow.com/questions/30236394/jasper-oracle-how-to-filter-by-date Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now