I have an application using EclipseLink and SQL Server.
When I execute the below JPQL query on a column of SQL Server type Time:
VisitMasterTable.bookingTime between '08:00:00' and '08:59:00'
then I get below error:
The data types
timeanddatetimeare incompatible in the greater than or equal to operator.
How is this caused and how can I solve it?
You need to add sendTimeAsDateTime=false to your connection string like:
jdbc:sqlserver://localhost:1433;databaseName=<db_name>;sendTimeAsDateTime=false
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With