Prev: Dockable windows
Next: How to Lock VBProject Programmatically without SendKeys (Note:- I don't want to Unlock or crack the VBProject. Just want to Lock it Programmatically)
From: satyanarayana K on 21 May 2010 08:55 Actually what happen is Asp.Net by Default support MM/DD/YYYY... so if u provide the date in dd/mm/yyyy format it will show the error(some cases means MM>12). so,u only write one method to convert to from MM/DD/yyyy to DD/MM/yyyy. ex: //read the value into one variable Datetime dtm=textbox.text //convert the Datetime to DD/MM/YYYY //using DateFormat_MMddyyyy method (user method ) DateTime Dt = Convert.ToDateTime(DateFormat_MMddyyyy(dtm.ToString())); //Now define the method pulic static string DateFormat_MMddyyyy(string dtm) { DateTime dt = DateTime.ParseExact(dtm,"MM/dd/yyyy", DateTimeFormatInfo. InvariantInfo); return dt.ToString("dd/MM/yyyy"); } url:http://www.ureader.com/msg/14485962.aspx |