Spire.XLS is a professional Excel API that enables developers to create, manage, manipulate, convert and print Excel worksheets. Get free and professional technical support for Spire.XLS for .NET, Java, Android, C++, Python.

Fri Jul 04, 2008 2:24 pm

hi!

i got the problem, that date is shown in excel as number.

date in datatable 01.01.2008
date in worksheet 1012008

another problem that a string like "1234-5678". this is transformed into different (positive or negative) number values.

i've checked this in the debugger, the value is changed directly after the call of InsertDataTable();

how does the parameter transTypes works here?

pb
 
Posts: 14
Joined: Fri Jun 20, 2008 11:05 am

Thu Jul 10, 2008 4:26 pm

Hello,

Please try to set transType parameters to true.
User avatar

Flash
 
Posts: 56
Joined: Thu Jun 29, 2006 2:34 pm

Mon Jul 14, 2008 6:42 am

Thanks,

that works.

pb
 
Posts: 14
Joined: Fri Jun 20, 2008 11:05 am

Thu Oct 07, 2010 9:22 am

I need to re-format my dates to "MMM d, yyyy". The problem I have is I
have an MSSQL database that allows <NULLS>.

I'm using this code to format the dates:
<%# IIF((dsCase.FieldValue("inj_beg", Container) <>
nothing),DateTime.Parse(dsCase.FieldValue("inj_beg ",
Container)).ToString("MMM d, yyyy"), "") %>
I'VE BEEN stuck with this, plz help
thanks a lot
Last edited by menswatches on Mon Oct 11, 2010 12:48 am, edited 1 time in total.

menswatches
 
Posts: 1
Joined: Thu Oct 07, 2010 9:12 am

Fri Oct 08, 2010 3:02 pm

Hello,

Please try to use following code,
String.Format("{MMM d, yyyy}", DateTime.Parse(dsCase.FieldValue("inj_beg ",Container));

Best Regards.
User avatar

Flash
 
Posts: 56
Joined: Thu Jun 29, 2006 2:34 pm

Return to Spire.XLS