Jump to content
We've recently updated our Privacy Statement, available here ×

Timestamp in SQL query issue


5alid.ps

Recommended Posts

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

  • Replies 1
  • Created
  • Last Reply

Top Posters In This Topic

Top Posters In This Topic

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 account

Sign in

Already have an account? Sign in here.

Sign In Now

×
×
  • Create New...