CodeCharge Studio
search Register Login  

Web Reporting

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

YesSoftware Forums -> CodeCharge Studio -> ASP.NET - InMotion Framework

 SQL Server 2008 Date datatype Error

Print topic Send  topic

Author Message
cvboucher

Posts: 191
Posted: 01/25/2010, 1:51 PM

I have a SQL Server 2008 table that has a column with a Date datatype (not datetime). When I have this column in a Grid I get the following error:

Unable to parse DateTime: String was not recognized as a valid DateTime.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.FormatException: Unable to parse DateTime: String was not recognized as a valid DateTime.

Source Error:


Line 155: if (AppConfig.IsMTErrorHandlerUse("all"))
Line 156: Trace.TraceError("Unable to parse DateTime.\n{0}", e);
Line 157: throw new FormatException("Unable to parse DateTime: " + e.Message);
Line 158: }
Line 159: }



Any ideas/suggestions?

Thanks,
Craig
View profile  Send private message
Hagen

Posts: 16
Posted: 01/25/2010, 2:20 PM

Try to change the format on your label or link for that date by mark it in the grid, and then adjust the format for this date in the properties.. (Example to Shordate, or to what's stored in yor DB..)
View profile  Send private message
PLogan

Posts: 22
Posted: 01/25/2010, 5:55 PM

I get this error if I don't use DATETIME. The new date format is new in SQL 2008 and probably not supported in INMOTION.
View profile  Send private message
cvboucher

Posts: 191
Posted: 01/26/2010, 8:18 AM

As a work around I CAST the column as a datetime when I select the column. Saving back to the table works fine.
Craig
View profile  Send private message

Add new topic Subscribe to topic   


These are Community Forums for users to exchange information.
If you would like to obtain technical product help please visit http://support.yessoftware.com.

PHP Reports

Visually create Web Reports in PHP, ASP, .NET, Java, Perl and ColdFusion.
CodeCharge.com

Home   |    Search   |    Members   |    Register   |    Login


Powered by UltraApps Forum created with CodeCharge Studio
Copyright 2003-2004 by UltraApps.com  and YesSoftware, Inc.