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