Conversion of Timestamp literal Aug 20 22:25:51 2018 to Timestamp(6)

Database
Teradata Employee

Conversion of Timestamp literal Aug 20 22:25:51 2018 to Timestamp(6)

Hi, 

I'm trying to convert Aug 20 22:25:51 2018 to Timestamp .

I used following SQL which is throwing me error.

 

SELECT To_Timestamp('Aug 20 22:25:51 2018', 'MON DD HH:MI:SS YYYY')

Giving me error "Teradata Failed 9134: Teradata hour of day must be in range 1-12


Accepted Solutions
Teradata Employee

Re: Conversion of Timestamp literal Aug 20 22:25:51 2018 to Timestamp(6)

Figured out the solution 

 

SELECT
To_Timestamp('Aug 20 22:25:51 2018', 'MON DD HH24:MI:SS YYYY')
1 ACCEPTED SOLUTION
1 REPLY 1
Teradata Employee

Re: Conversion of Timestamp literal Aug 20 22:25:51 2018 to Timestamp(6)

Figured out the solution 

 

SELECT
To_Timestamp('Aug 20 22:25:51 2018', 'MON DD HH24:MI:SS YYYY')