PL SQL - Convert timestamp to datetime/date

Viewed 26958
select 
to_timestamp(SCHEDULED_TIME,'YYYY-MM-DD HH24:MI:SS.FF') as SCHEDULED_TIME,
TRUNC(to_date(to_timestamp(SCHEDULED_TIME,'YYYY-MM-DD HH24:MI:SS.FF'),'YYYY-MM-DD HH24:MI:SS'))
from S_TIDAL_STATUS

The error was: ORA-01830: date format picture ends before converting entire input string 01830. 00000 - "date format picture ends before converting entire input string"

The goal is to return something like

2017-07-91 23:14:00 (without the content after the dot).

Here's what the SCHEDULED_TIME (timestamp) looked like: enter image description here

2 Answers
Related