how to get this complex TIMESTAMP output ?

Database
Enthusiast

how to get this complex TIMESTAMP output ?

A source table have following columns

POST_DATE VARCHAR(8) 

POST_TIME INTEGER

and these columns contains DATE and TIME values..such as

POST_DATE            POST_TIME

20101231              150550

20101231              132004

in target table , i have to club above mentioned source columns into a single TIMESTAMP column.

I have tried several ways to CAST it but with no luck.

Any solution would be greatly appriciated.


2 REPLIES
Senior Apprentice

Re: how to get this complex TIMESTAMP output ?

post_date || (post_time (FORMAT '999999')) (TIMESTAMP(0), FORMAT 'yyyymmddhhmiss')

Dieter

Enthusiast

Re: how to get this complex TIMESTAMP output ?

thank you Dieter....this works.. with my SQLs I was getting invalid timestamp error while using CAST.