Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
British Date
Message
 
 
To
All
General information
Forum:
ASP.NET
Category:
Other
Title:
British Date
Miscellaneous
Thread ID:
00916962
Message ID:
00916962
Views:
37
I am storing the current date to a text box with the following code.
this.txtDob.Text = System.DateTime.Today.ToString("dd/MM/yyyy") ;
I am then trying to save the date into a dataset created from an XML file. When it tries to save this.txtDob.Text I receive the following error.

An unhandled exception of type 'System.ArgumentException' occurred in System.Data.dll

Additional information: Couldn't store in db Column. Expected type is DateTime.

I have tried using System.DateTime.Parse(this.txtDob.Text) but that causes another error.

I think it's caused by the British date format.

Any ideas on how to proceed?

Thanks.

John
Next
Reply
Map
View

Click here to load this message in the networking platform