Hi All, I need to convert dd/mm/yyyy string to valid Datetime using C#. Please help me. It is urgent. Thanking you in Advance. Bye....
Posted: Wed Aug 27, 2008 10:37 am Post subject:
Hi Mouli, Try this Code: string UrDate = "27/08/2008"; System.Globalization.DateTimeFormatInfo dateInfo = new System.Globalization.DateTimeFormatInfo(); dateInfo.ShortDatePattern = "dd/MM/yyyy"; DateTime validDate= Convert.ToDateTime(toDate, dateInfo); validDate will contains the Valid Datetime..
转载请注明原文地址: https://ibbs.8miu.com/read-2235621.html