Spire.DataExport for .NET is a 100% pure data .NET library suit for exporting data into MS Word, Excel, RTF, Access, PDF, XPS, HTML, XML, Text, CSV, DBF, SYLK, SQL Script, DIF, Clipboard, etc.

Sat Feb 19, 2011 4:19 pm

Hello,

When exporting DateTime column to xls or txt file, the time part of the value is always 00:00:00.
I've tryed this

exp.DataFormats.DateTime = "d/M/yyyy H:mm";

and that

static void exp_GetDataParams(object sender, Spire.DataExport.EventArgs.DataParamsEventArgs e)
{
if (e.Col == 1)
{
e.FormatText = "d/M/yyyy H:mm";
}
}

with no success.

Any answer to this problem ?

Regards.

williot
 
Posts: 1
Joined: Thu Feb 17, 2011 2:23 pm

Mon Feb 21, 2011 5:49 am

Hi,
Sorry for any inconvenience caused by us.
That's an issue left over by compatibility of data type of different database. We plan to fix it in the next release.
At present, I suggest you format DataTime type column in your SQL (if you use SQLCommand) or in your code (if you use DataTable) before exporting operation.
Harry
Technical Support / Developer,
e-iceblue Support Team
User avatar

harry.support
 
Posts: 180
Joined: Mon Nov 08, 2010 3:11 pm

Return to Spire.DataExport