-
Hi,
I am trying to get the months between 2 dates, however I think there is something wrong with my format and I couldn't get the result.
Two date fields namely : due_date, sysdate (both of DATE type)
SELECT MONTHS_BETWEEN (
TO_DATE(due_date,'MM-DD-YYYY'),
TO_DATE(sysdate,'MM-DD-YYYY') ) "Months"
FROM table_name
/
ORA-01858: a non-numeric character was found where a numeric was expected
Can anyone help me with the format please? Thanks! :)
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
|