Click here to Skip to main content
15,890,512 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
How to write oracle query to check Selected date should not between or equal FromDate and ToDate


please do need full

What I have tried:

'05-jan-2018' NOT BETWEEN trunc(fromdate) AND trunc(todate)
Posted
Updated 4-Jan-18 2:36am
v2

1 solution

As you are using trunc I'm assuming that todate and fromdate are datetime rather than just date. Try this
SQL
where to_date(2018-01-05,YYYY-MM-DD) > to_date(fromdate) AND to_date(2018-01-05,YYYY-MM-DD) < to_date(todate);
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
Top Experts
Last 24hrsThis month


CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900