November 25, 2013 at 12:21 pm
Hi,
I have column paid_date which has to be converted to time stamp and dump in oracle.
I am using the dervied column but keep getting the error
Derived column:
(DT_DBTIMESTAMP)(SUBSTRING(paid_date,1,4) + "-" + SUBSTRING(paid_date,5,2) + "-" + SUBSTRING(paid_date,7,2) + " " + SUBSTRING(paid_date,11,9))
Shaun
November 26, 2013 at 6:03 am
Try converting paid_date to varchar before using substring. Something like this:
select SUBSTRING(convert(varchar(25), paid_date),1,4) + '-' + SUBSTRING(convert(varchar(25), paid_date),5,2) + '-' + SUBSTRING(convert(varchar(25), paid_date),7,2) + ' ' + SUBSTRING(convert(varchar(25), paid_date),11,9)
Mark
November 26, 2013 at 7:43 am
its working now... thanks mark..
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy