TIMESTAMP(0) showing .0 at the end

Database
Enthusiast

TIMESTAMP(0) showing .0 at the end

Hi !

I am trying to fetch some data from my table and save it in a file using JDBC.

One of the column is of TIMESTAMP(0) format.

In the table data is like : 2010-09-02 07:47:02

However when I am saving it in a text file using JDBC : 2010-09-02 07:47:02.0

Can anyone please tell me why I am getting an extra 0 at the end and how to remove it .

Thanks in advance.

Nitin 'Raj' Srivastava
2 REPLIES
Teradata Employee

Re: TIMESTAMP(0) showing .0 at the end

>>> However when I am saving it in a text file using JDBC
The Teradata JDBC Driver does not save any data in a text file.
So your application would be doing the saving to a text file.
Please copy-and-paste your application code that calls the JDBC Driver, and that subsequently saves the data to a file. Then we can perhaps determine why the .0 is appearing.
Teradata Employee

Re: TIMESTAMP(0) showing .0 at the end

Hi,

This has to do with the FORMAT setting not at the database end, but at the application end. So try to tweak that. For assurance if the issue is same .... try to put data in file by casting it to VARCHAR.

HTH!

Regards, MAC