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.
Thu Sep 20, 2007 9:37 am
Hi
I want to export datatable into excel file but the column in which datetime is present shows only date part and time part shows 12:00:00 AM.
Please suggest some remedy for this problem.I am using Imports Spire.DataExport.XLS namespace and CellExport1.DataFormats.DateTime = "M-d-yyyy H:mm"
CellExport1.SaveToHttpResponse("res.xls", Response)
This is very urgent.
Thanks in advance...........
-
sgohane
-
- Posts: 3
- Joined: Thu Sep 20, 2007 9:13 am
Thu Sep 20, 2007 1:56 pm
Hello,
Try to format datetime value in GetDataParams event of Spire.DataExport, see following code.
- Code: Select all
private void cellExport1_GetDataParams(object sender, Spire.DataExport.EventArgs.DataParamsEventArgs e)
{
if ((e.Sheet == 0) && (e.Col == 6))
{
e.FormatText = "M-d-yyyy H:mm";
}
}
-
DataExport
-
- Posts: 35
- Joined: Thu Jun 29, 2006 2:29 pm
Fri Sep 21, 2007 7:01 am
Thanks for your suggestion but it was of no use instead of i given string format specifer for datetime in datatable
-
sgohane
-
- Posts: 3
- Joined: Thu Sep 20, 2007 9:13 am
Tue Dec 08, 2020 8:10 am
I am trying to fill pdf XFA form (Code attached) using below
Spire.Pdf but my code is not updating
datetime field rest all fields has been updated. Can anyone help to fill my pdf form dynamically using c#?
SWITCH CONDITION- Code: Select all
case "form1[0].DDEEInput[0].EaxmCompletedDate[0]":
XfaDateTimeField xfSCompleteDate = xfaField as XfaDateTimeField;
xfSCompleteDate.Value ="12/05/2020";
break;
-
ameer123
-
- Posts: 2
- Joined: Tue Dec 08, 2020 8:04 am
Tue Dec 08, 2020 9:56 am
Hi ameer123,
Thanks for your post.
To help us reproduce your issue and solve it, please provide us with your input PDF file. You could upload it here or send it to us (
support@e-iceblue.com) via email. Thanks in advance for your assistance.
Sincerely,
Rachel
E-iceblue support team
-
rachel.lei
-
- Posts: 1571
- Joined: Tue Jul 09, 2019 2:22 am