Home Best way of converting Oracle SQL query to JPA JPQL BETWEEN DATE/TIME
Reply: 0

Best way of converting Oracle SQL query to JPA JPQL BETWEEN DATE/TIME

user457
1#
user457 Published in May 23, 2018, 8:07 pm

I am trying to run this SQL statement that finds a created entry between 6AM today to 6AM the next day. However I am having trouble finding a way of doing this with JPA JPQL. Any info will help, thanks.

SQL STATEMENT

    SELECT * FROM OTHER_ENTRY WHERE CREATED_DT 
    BETWEEN
    trunc(current_timestamp) + interval '6' hour
    AND 
    trunc(current_timestamp + 1)+ interval '6' hour;
You need to login account before you can post.

About| Privacy statement| Terms of Service| Advertising| Contact us| Help| Sitemap|
Processed in 0.319128 second(s) , Gzip On .

© 2016 Powered by mzan.com design MATCHINFO