-
Hi All
is the a date fuction I can use to get the a number of days between two date variables.
e.g number of days between 02-APR-02 and 03-APR-02.
Thanx
-
How about the minus (-) function :-)
Code:
SQL> select to_date('03.04.2002','dd.mm.yyyy')-to_date('02.04.2002','dd.mm.yyyy') DAYS from dual;
DAYS
----------
1
SQL>
Oracle Certified Master
Oracle Certified Professional 6i,8i,9i,10g,11g,12c
email: ocp_9i@yahoo.com
-
Date subtraction...
Code:
1 select
2 to_date('02/02/2002','mm/dd/yyyy') - to_date('03/04/2002','mm/dd/yyyy') date_diff
3* from dual
SQL> /
DATE_DIFF
----------
-30
Jeff Hunter
-
SQL> select trunc(sysdate-to_date('20/03/02','dd/mm/yy')) "Diff"
2 from dual;
Diff
----------
14
Tarry Singh
I'm a JOLE(JavaOracleLinuxEnthusiast)
--- Everything was meant to be---
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|