SUPPORT THE SITE WITH A CLICK

Subscribe Rss:

SUPPORT THE SITE WITH A CLICK

Friday, November 2, 2007

string was not recognized as valid datetime

String was not recognized as valid datetime


Hi i also had the same problem my applications will be running in localhost but when i use IIS or apache it will throw the error String was not recognized as a valid DateTime.After a lot of search i finally got the solution

just declare ur date field as

System.DateTime str_date=DateTime.Parse(sel3.Text,System.Globalization.CultureInfo.
CreateSpecificCulture("en-AU").DateTimeFormat);

I hope it will work fine in ur application

Thanks in Advance,

N.ThillaiArasu,

http://nthillaiarasu.blogspot.com

No comments :

Post a Comment