When I using
select trunc(sysdate) from dual
I got the correct date which is today in a good format. like "6/24/2013"
And if I do
select trunc(sysdate)-1 from dual
I got yesterday date with a good format.
However, if i do:
select trunc(sysdate)- trunc(sysdate-1) from dual
I suppose to get 1, but what i got is /d/yyyy
All I want to do is calculate how many days between two dates. By using Trunc(date) - Trunc(another date), I always got /d/yyyy rather than the days between this two dates.
How can do that?
Thanks in advance.