Click here to Skip to main content
15,919,340 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
In my Asp.net Website i have two textboxes (txtstartdate, txtenddate) applied JQquery Datepicker which popups gives date in format ("05/24/2012"). Work fine for cultureInfo("en-US"), when i change to ("de") ie German its give error "System.FormatException: String was not recognized as a valid DateTime."
Posted
Updated 31-Oct-12 19:54pm
v2

you can do this by passing cultureinfo.
C#
ie.  CultureInfo culture = new CultureInfo(cultureName);
     var  dateTimeValue = Convert.ToDateTime(dateStr, culture);


for more info follow link
http://msdn.microsoft.com/en-us/library/9xk1h71t.aspx[^]
 
Share this answer
 
i think you need to use like "de-DE".
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900