CASTING a VARCHAR(50) TO TIMESTAMP(3)

Database
Enthusiast

CASTING a VARCHAR(50) TO TIMESTAMP(3)

Hi All,

I need urgent help in CASTING.

I have 8/25/2013 2:49:49.164869 AM in Source and want to convert It to TIMESTAMP(3) 24 hour format.

Another Example : 8/25/2013 8:53:49.164869 PM

Thanks,

Rakesh

2 REPLIES
Enthusiast

Re: CASTING a VARCHAR(50) TO TIMESTAMP(3)

Enthusiast

Re: CASTING a VARCHAR(50) TO TIMESTAMP(3)

Thanks. But the below  sample query is giving me error.

SEL TO_TIMESTAMP('May 10 2013 10:58:04:3934PM', 'Month dd yyyy hh:mi:ss:FF4AM').

Also please check my example is previous post. Its a Varchar and has space between timestamp and PM ,AM.

Also the month is not in MM format.Also the Hour is not in HH format.

Thanks,

Rakesh