All Forums UDA
Senth 3 posts Joined 04/09
19 Apr 2009
Teradata Default date format Issue.

Hi All,When I use SQL query for selecting current timestamp. Teradata is not not returning ISO format like "YYYY-MM-DDBHH:MI:SS"SQL: SELECT CURRENT_TIMESTAMP;Programming Language: ASP, ADOODBC: Teradata v12.1 (TTU v12)I guess problem is with teradata ODBC driver. So that recordset not returning teradata timestamp format.

robpaller 159 posts Joined 05/09
14 May 2009

Have you tried using a format clause on your SELECT to return it in the format desired? SELECT CAST(CURRENT_TIMESTAMP(0) AS TIMESTAMP(0) FORMAT 'YYYY-MM-DDBHH:MI:SS');

Fred 1096 posts Joined 08/04
15 May 2009

Teradata is returning the TIMESTAMP in the binary format specified by the API, and your application is formatting it on the client side.If you prefer Teradata to do the display formatting before returning the value to the client, CAST the field to CHAR or VARCHAR.

Senth 3 posts Joined 04/09
23 Jun 2009

Thank you! I have used CAST function. It works!.

You must sign in to leave a comment.