Hi Sudipta,
there are different datatypes in Teradata for DATE, TIME and TIMESTAMP.
When you cast a string to a time you can't use a date part, when you cast to a date you can't use a time part.
In your case either keep data as is and use the cast i showed or use the rearranged data and cast to a timestamp.
And because the FORMAT is based on Cobol you must use a 'B' instead of a blank in the format string: yyyy-mm-ddBhh:mi:ss
You'll find a lot about working with DateTime datatypes scattered throughout the manuals and there's an old article written by Geoffrey Rommel on the TeradataForum website covering the basics: http://www.teradataforum.com/l081007a.htm
It's a bit outdatet, as there are more advanced datatypes/functions, but there are two good articles on PERIODs by Rob Garrison:
http://developer.teradata.com/database/articles/exploring-teradata-13s-period-functions
Hi Sudipta,
there are different datatypes in Teradata for DATE, TIME and TIMESTAMP.
When you cast a string to a time you can't use a date part, when you cast to a date you can't use a time part.
In your case either keep data as is and use the cast i showed or use the rearranged data and cast to a timestamp.
And because the FORMAT is based on Cobol you must use a 'B' instead of a blank in the format string: yyyy-mm-ddBhh:mi:ss
You'll find a lot about working with DateTime datatypes scattered throughout the manuals and there's an old article written by Geoffrey Rommel on the TeradataForum website covering the basics: http://www.teradataforum.com/l081007a.htm
It's a bit outdatet, as there are more advanced datatypes/functions, but there are two good articles on PERIODs by Rob Garrison:
http://developer.teradata.com/database/articles/exploring-teradata-13s-period-functions
Dieter