Date Formatting


#1

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)




#2

Please download and try v3.4.4 at www.aspose.com/downloads .


#3

That did the trick, thanks.


#4

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


#5

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