Date Formatting


I’m trying to import a datatable into a CSV file format. The problem I’m having is that the date field shows the Juialn date, I want it in the “mm/dd/yyyy” format. Here’s my code:


Dim excel As Excel = New Excel()

Dim dtExport As DataTable = dsAdHocResults.Tables(“Export”)

Dim mySheet As Worksheet = excel.Worksheets(0)

mySheet.Cells.ImportDataTable(dtExport, True, 0, 0, dtExport.Rows.Count, dtExport.Columns.Count, False, “mm/dd/yyyy”)

excel.Save(“result.csv”, SaveType.OpenInExcel, FileFormatType.CSV, Response)


Please download and try v3.4.4 at .


That did the trick, thanks.


Can this formatting feature be added to the import data view function?


Sure. I will add this feature in one or two weeks.