Possible Duplicate:
Conversion from string “31/03/2012” to type 'Date' is not valid
I tried Data.Parse and Convert.todatetime but now it says that
String was not recognized as a valid DateTime. I also configured .NetGlobalozation and setUI Culture to “English (United States) (en-US)” with the default “Invariant Language (Invariant Country)” but no use. What am i missing ?? The stack trace is as follows..
[FormatException: String was not recognized as a valid DateTime.]
System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi,
DateTimeStyles styles) +2845862 System.DateTime.Parse(String s) +25
ProwessWebApp.Finyr.SSCreate_Click(Object sender, EventArgs e) in
E:\DevVB2008\ProwessWebApp\ProwessWebApp\ProwessWebApp\Finyr.aspx.vb:130
System.Web.UI.WebControls.Button.OnClick(EventArgs e) +111
System.Web.UI.WebControls.Button.RaisePostBackEvent(String
eventArgument) +110
System.Web.UI.WebControls.Button.System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(String
eventArgument) +10
System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler
sourceControl, String eventArgument) +13
System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData)
+175 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)
+1565
Can u plz tell me what to do ??
Dev..
31/03/2012is not a valid english-us date. english-us uses a “month/day/year” ordering, while your input date is “day/month/year”.03/31/2012is the right ordering for your input, or use a different locale (french…).