Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    How to format DateTimeItem

    I have a DateTimeItem and I want to know how to display the date and time in a custom format, namely:

    MM/DD/YYYY HH:MM:SS

    so...
    DateTimeItem dateTimeItem = new DateTimeItem();
    dateTimeItem.setDisplayFormat( ??? );

    #2
    Bumping message

    Anyone?

    Comment


      #3
      What comes closest to your requirements is
      dateTimeItem.setDisplayFormat(DateDisplayFormat.TOJAPANSHORTDATETIME);
      which will generate YYYY-MM-DD HH:MM:SS

      Comment


        #4
        Yeah, any of those preset formats do not meet my needs. I just don't understand the crazy formatting the SmartGWT stuff uses so need help creating a custom format. I was able to do it fine formatting a date time column in a ListGrid but this seems different.

        Comment

        Working...
        X