/t5/coldfusion-discussions/date-diff-for-oracle-9i/td-p/741369Dec 12, 2006
Dec 12, 2006
Copy link to clipboard
Copied
Hi Guys,
I'm new in oracle... I'm using oracle in cf application now.
Oracle 9i.
Now i want to display records for 6 months. How to use
datediff function in oracle?
My query will like this
Select * from tblname
Where datediff(now(),fielddate) <= 6.
/t5/coldfusion-discussions/date-diff-for-oracle-9i/m-p/741371#M69136Dec 12, 2006
Dec 12, 2006
Copy link to clipboard
Copied
You might want to use "where fielddate > SYSDATE - 180,
but 180 is just an approximation in days of 6 months and won't be
exact. I use 8i, but aside from outer joins, they're very similar.
I highly recommend this page:
http://www.techonthenet.com/oracle/index.php