Question

What's wrong with below statement. I am getting error date format not recognized

select to_timestamp_tz( to_char(to_date(sysdate-1,'dd/mon/yyyy') ,'dd/mon/yyyy hh:mi:ss -05:30'),'dd/mon/yyyy hh:mi:ss TZH:TZM') from dual

please help me.

No correct solution

OTHER TIPS

You don't need to convert sysdate-1 to date. Its already a date. So your query should be something like:

       select to_timestamp_tz( to_char(sysdate-1 ,'dd/mon/yyyy hh:mi:ss'),'dd/mon/yyyy hh:mi:ss TZH:TZM') from dual;

Hope it helps

Vishad

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top