Format of Date in column to export in Excel C #

0

I try to export a datatable to Excel but in some date columns I export them in number, I already tried sending from the database the information I need but it does not work.

    
asked by Luis Angel Martinez Mendez 13.08.2018 в 18:53
source

1 answer

0

Before exporting, make a change to the data type of the column, better if you take it to a Varchar and when exporting it to the excel it will take it as Varchar

Select CONVERT(VARCHAR,fecha, 10) AS FECHA FROM TABLA
    
answered by 13.08.2018 в 20:17