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.

没有正确的解决方案

其他提示

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

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top