only My site

Tuesday, March 2, 2010

Handling Date in UI

using System.Globalization;

IFormatProvider culture = new System.Globalization.CultureInfo("en-GB", true);

DateTime.ParseExact(txtStartDate.Text.Trim(), "dd/MM/yyyy", culture, System.Globalization.DateTimeStyles.NoCurrentDateDefault);

No comments: