Announcement

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

    ListGrid Export with Date format

    I am using exportData on listGrid...Its working fine if i have only normal fields like text. But I have a problem with date field (without time). My exported data comes with time value (ex. 01/06/10 00:00:00 ) but I use "EuropeanShortDate" in data source.

    I need only date value in exported data file.

    Please suggest us that how I remove time (00:00:00) value and also how I make date field as customized.

    Below is snippet of my code.

    Datasource:
    ..............
    <field name="DOB" title="DOB" type="date" useTextField="true" textAlign="LEFT" dateFormatter="toEuropeanShortDate" />
    ..................
    .................

    Code:
    (1) DSRequest dsRequestProperties = new DSRequest();
    (2) dsRequestProperties.setExportAs( (ExportFormat) EnumUtil.getEnum
    (ExportFormat.values(), "csv"));
    (3) dsRequestProperties.setExportDisplay(ExportDisplay.DOWNLOAD);
    (4) cmps.gamesTree.childList.getField ("crew_in_date").setType(ListGridFieldType.DATE);
    (5) cmps.gamesTree.childList.exportData(dsRequestProperties);


    Thanks.

    #2
    Wrong forum (use SmartGWT forum for SmartGWT questions - your post has been moved). Also, always post your exact versions (see FAQ).

    Comment


      #3
      Hi, Is there any update on this? Thanks.

      Comment


        #4
        Hi,

        Is there a way to export dates from a grid without the dates being appended with time information as detailed above? Yes? How? Please advise.

        Thanks.

        Comment


          #5
          Please see previous post - you were asked to post versions involved.

          Comment

          Working...
          X