• If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Announcement

Collapse
No announcement yet.

Timestamp in NAB Grid widget

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Timestamp in NAB Grid widget

    I changed the format of a timestamp field to timestamp(0) - i.e. the field precision of the field is now seconds instead of microseconds.

    Now, I can't display the value using one of the Date formatting options. The grid will only display the value if formatting is removed.

    I've changed the field back to the default timestamp format so that it displays properly.
    Last edited by gwilburn; 03-08-2022, 10:20 AM.

  • #2
    Not sure I am clear. What does the data look like when not formatted (2022-03-08-09:26:13:123456)? And what date formatting option did you select that is not working?

    Comment


    • #3
      If the database field is defined as timestamp(0) it looks like
      2022-03-08-09:26:13 (without formatting)

      If the database field is defined as timestamp it looks like
      2022-03-08-09:26:13.123456 (without formatting)

      If I apply any of the Date formats in the grid widget, it displays blank/empty in the grid if the database field is timestamp(0).

      2022-03-08 10_34_50-Valence 6.0.png

      Comment


      • #4
        OK, I see, wasn't familiar with the timestamp(0) syntax. You are going to have to apply custom formatting since we do not support timestamp(0). I think this is what you are looking for...

        Code:
        return Ext.util.Format.date(Ext.Date.parse(v, 'Y-m-d-H.i.s'), 'm-d-Y @ g:iA');

        Comment


        • #5
          Thanks Sean... I've already changed the database format of my timestamp fields.
          I updated my original post in case someone else encounters this.

          Comment


          • #6
            Originally posted by sean.lanktree View Post
            OK, I see, wasn't familiar with the timestamp(0) syntax. You are going to have to apply custom formatting since we do not support timestamp(0). I think this is what you are looking for...

            Code:
            return Ext.util.Format.date(Ext.Date.parse(v, 'Y-m-d-H.i.s'), 'm-d-Y @ g:iA');
            I would like to recommend this as a future enhancement. It would be nice if the NAB date formats supported timestamp(0) format. Many of the IBM SQL "views" in QSYS2 return timestamps in timestamp(0) format.

            A good example would be
            Code:
            Select * from qsys2.scheduled_job_info;

            Comment


            • #7
              Hi,

              In the next Valence 6.1 update (greater than 6.1.20220405) NAB will support timestamp(0)

              Thanks

              Comment

              Working...
              X