Click here to Skip to main content
15,919,245 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi friends

I have a textbox in which i am taking the to and from date entry and using that i am binding the grid view . But the date time is giving me error when i am choosing german or french language , in english it works fine ......

Error :
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: String was not recognized as a valid DateTime.
Posted

1 solution

Hi,

In german language date format is "dd.MM.yyyy" in English language it is like this "dd/MM/yyyy" . When your system is in german language convert date to dd.MM.yyyy format.
 
Share this answer
 
Comments
Vimalrashamra 31-Oct-12 6:00am    
how i convert it for language
Vimalrashamra 31-Oct-12 8:19am    
Thanks dude

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