How can I make a SQL that return to me a column date minus another column date with the format like this '05:55 PM'.
Thanks.....
Printable View
How can I make a SQL that return to me a column date minus another column date with the format like this '05:55 PM'.
Thanks.....
select to_char(sysdate,'hh12:mi AM') "Date" from dual;
this is to return with minus option
select '-'||to_char(sysdate,'hh12:mi AM') "Date" from dual;
No, you didn't understand, I want to select the difference between two dates in this format.
Thanks....
date-date is a valid operation and the result is just a number. This is the difference of time. There can not be any am/pm attached to it.