Dojo Enhanced Grip: Export to CSV. Formatting Date Object in CSV?

Discussion created by Meengla on Feb 3, 2014
Latest reply on Feb 4, 2014 by Meengla
I have a Dojo Enhanced Grid which is populated by data from an ESRI query. One of the data fields ("DateRetrieved") is a SQL Server date field; ESRI's query converts that into a numeric data value. I then use javascript to format and display that in the Dojo Enhanced Grid. So far so good. But I when export the Grid to a .CSV file the numeric date value gets exported instead of the displayed/formatted date value from the Grid.

I thought I could some kind of function during the export which would look for the DateRetrieved column's values and then formats using javascript before the CSV data gets sent to the .NET application. But I can't find anyone who has something like that.

Anyway, here is code snippet which is being used.

Thank you!

               writerArgs: { separator: "," } 

                   //here the data gets posted to a .NET page. Works fine