Hi, i want a query which gives the time our call center opens and the time our call center closes.
Here is the query i am using
select Date, Hour_From, Hour_To from
(Select (Sysdate-1) Date, to_char(to_date('050000','hh12:mm:ss'), 'hh12:mm:ss') Hour_From,
to_char(to_date('115959','hh12:mm:ss'), 'hh12:mm:ss') Hour_From from Dual
Union all
Select (Sysdate-1) Date, to_char(to_date('130000','hh12:mm:ss'), 'hh12:mm:ss') Hour_From,
to_char(to_date('235959','hh12:mm:ss'), 'hh12:mm:ss') Hour_From from Dual)
The output i need is
Date Hour_From Hour_To
Sysdate-1 05:00:00 AM 11:59:59 AM
sysdate-1 01:00:00 PM 11:59:59 PM
In the above output sysdate-1 is date datatype not a string
I dont know whats the problem i am getting literal match doesnot match format string error.
Please Help