Feb 09, 2009, 7:30 AM
DateField Problem - Wrong SelectedDate regardless of the format
Hello,
I'm using the DateField to allow the user select a particualr date. I'm setting the Format of the DateField to dd-m-yyyy. The selected date is displayed properly in the DateField box, but when getting the value of the selected date into, for example, a label as the following:
I'm using the DateField to allow the user select a particualr date. I'm setting the Format of the DateField to dd-m-yyyy. The selected date is displayed properly in the DateField box, but when getting the value of the selected date into, for example, a label as the following:
lblDate.Text = dtFrom.SelectedDate.Date.ToString();
the value is incorrect, for example, if the the selected date was 23-04-2009 the label text would be 1/23/2009, now regardless of the format, I didn't select the 1/23/2009 date, instead it was 23-04-2009. Thanks in advance