convert varchar data into timestamp

Database

convert varchar data into timestamp

Hi All,

can you please help me with this

I am trying to convert below varchar records into timestamp.

 2016-08-03 8:32:03

2016-08-03 11:56:34

Tried multiple ways of casting but not ablt to get.

Regards,

Krishna

1 REPLY
N/A

Re: convert varchar data into timestamp

sel cast('2016-08-03 08:32:03' as timestamp format'yyyy-mm-ddbhh:mi:ss')

This Worked for me Try once