Menu

DB2 Timestamp datatype

Help
Anonymous
2009-02-09
2013-04-29
  • Anonymous

    Anonymous - 2009-02-09

    I am trying to get SQLExplorer to display full timestamp detail for datatype 93 TIMESTAMP.

    it is defaulting to YYYY-MM-DD HH:MM:SS.

    how do I get full microseconds etc?

     
    • Anonymous

      Anonymous - 2009-02-13

      As a work around for this issue I have discovered that if I use the char() function to wrap any timestamps in you Select it will display full detail.

      I would still appreciate a proper fix for this however.

      Thanks!

       
    • Heiko Hilbert

      Heiko Hilbert - 2009-02-15

      Hi NHodges,

      currently for all date and time types (DATE,TIME,TIMESTAMP) a default format is used. This should be changed to use a format suitable for the type.
      Pleas open a bug report in the bug tracker for this. I will fix it in the next round.

      Thx
      Heiko

       
    • Anonymous

      Anonymous - 2009-03-09

      I have installed the patch in RC7 and am only getting 3 of the 6 nanoseconds it the DB2 timestamp. If I change the format for Date Time Format to yyyy-MM-dd HH:mm:ss:SSSSSS rather than the default with only 5 nanoseconds, it only zero pads them.

      By the way, thank you very much for the quick responses! They are appreciated.

      Nevin.

       
      • Heiko Hilbert

        Heiko Hilbert - 2009-03-09

        First: If you have installed RC7 you need no patch.

        Internaly we use the Java SimpleDateFormat which does not support nanoseconds. But you can switch off date formatting by unchecking the checkbox 'Format date/time values' in the SQLExplorer/Results preferences. After that the default string representaion of the SQL timestamp from the JDBC vendor is used. If this is not what you want you have to use your database specific convert functions to convert the timestamp into a string.

        Heiko

         

Log in to post a comment.