Convert varchar to date and timestamp.

Database
Enthusiast

Convert varchar to date and timestamp.

Hi ,

 

Can someone please help me converting this value in varchar to date and timestamp.

 

sample value 

 

02/Jan/2018:21:32:32 +0000    (varchar )

Tags (1)
3 REPLIES
Enthusiast

Re: Convert varchar to date and timestamp.

deleted my response given the much more elegant solution below

Teradata Employee

Re: Convert varchar to date and timestamp.

Try:

select cast('02/Jan/2018:21:32:32 +0000' as timestamp with time zone format'DD/MMM/HH:MI:SSBZ')

Enthusiast

Re: Convert varchar to date and timestamp.

so much easier