Oracle SQL - date comparison does not work -
i want retrieve records datetime schedfinish field value today or tomorrow (regardless of time part, date part important)
i tried this:
select schedfinish plans to_date(current_date,'yyyy/mm/dd')+1<= to_date(schedfinish,'yyyy/mm/dd'); but returns me schedfinish column values , 31.10.2013; 28.2.2014, 31.1.2015 results totally incorrect. utilize current_date syntax if possible why not work?
if seek today works:
to_date(current_date,'yyyy/mm/dd')= to_date(schedfinish,'yyyy/mm/dd') but need today , tomorrow.
thanks
assuming schedfinish date datatype, can this:
where schedfinish >= trunc(current_date) , schedfinish < trunc(current_date + 2) sql oracle date
No comments:
Post a Comment