Click to See Complete Forum and Search --> : query involving time stamp


Abhijat
11-30-2011, 12:59 PM
Hi Experts,
Can some one please highlight the mistake and its fix in the query below? Thanks.

select id,measure, last_day(to_date(frcstprdenddt,'rrmm')) as frcstprdenddt, periodicity, estimator,
to_timestamp( to_char(announcestopdt,'mm/dd/yyyy') || ' ' ||announcestoptm , 'HH24:MI:SS.FF') as announcestopdt
from raw_ibesstpepsatus
and frcstprdenddt<>'0'
order by id, measure, frcstprdenddt, periodicity, estimator, announcestopdt, announcestoptm;

I get ORA-01830: date format picture ends before converting entire input string

LKBrwn_DBA
11-30-2011, 03:45 PM
Hi Experts,
Can some one please highlight the mistake and its fix in the query below?
Here:

to_timestamp(to_char(announcestopdt,'mm/dd/yyyy')||' '||announcestoptm, 'MM/DD/YYYY HH24:MI:SS.FF')
-- Here -----------------------------------------------------------------^^^^^^^^^^^
:rolleyes:

Abhijat
12-01-2011, 03:38 PM
thanks!