Developer forum

Forum » Development » Datetime exception

Datetime exception


Reply


I recently uploaded a custommodules.dll that I worked on, on my localhost.



I suddenly get a DateTime Exception all the places i try to convert a string to a datetime format.



It says something like "31-12-2999" not recognized as a valid datetime format. i tried to reverse the order to "2999-12-31" and it converted fine.



How do you generally go about this problem?



Is it a server configuration?



Can it be done within the application?



thanx in advance



- Sune

Replies

 
Reply
Forget it

Found a solution:



DateTime.ParseExact(Base.Request("dateOfBirth"),"dd-MM-yyyy",new System.Globalization.CultureInfo("fr-FR", true));

 

You must be logged in to post in the forum