All Forums Database
TD_Raj 50 posts Joined 05/10
02 Sep 2010
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

tomnolan 594 posts Joined 01/08
02 Sep 2010

>>> 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.

Adeel Chaudhry 773 posts Joined 04/08
03 Sep 2010

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

-- If you are stuck at something .... consider it an opportunity to think anew.

You must sign in to leave a comment.