-
Dear List,
I want to convert the resultant numeric value of the subtracting 2 date columns in a table.
Eg:
select sysdate-joindate from emp
will result in a numeric value. I want this numeric value to be displayed as a date value.
Any clues
TIA
Venkat
-
Can you provide an example?
What is the result of April 10, 2001 - April 8, 2001 in a date format?
David Knight
OCP DBA 8i, 9i, 10g
-
The result of subtracting 2 dates is the number of days.
1 select to_date('22/10/2001','dd/mm/yyyy') -
2* to_date('20/10/2001','dd/mm/yyyy') result from dual
SQL> /
RESULT
---------
2
Badrinath
-
Yor question is how can I display the number 2 as a date ?
It does not make sense , does it ?
-
I agree that the answer is 2.
David Knight
OCP DBA 8i, 9i, 10g
-
or you really mean subtract two dates instead in number of days you want it in months and days
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
|