I am trying to store DoteOfBirth from a Calender control in visual studio 2010.
Dim dob As Date = Calendar1.SelectedDate.Date.ToShortDateString()
I wanna save like dd/MM/yyyy without anything else but when i save it it shows like
2012-02-28T00:00:00+00:00
I don’t know where to change the format and I don’t know how to remove the thing attached to the date. I am writing it in vb.net and saving to xml file.
Thanks so much.
If you’re using a
DateTimePickercontrol, you should use theFormatorCustomFormatproperties.If you’re using the
MonthCalendarcontrol … well, you may consider using theDateTimePickerinstead, as per this excerpt from MSDN: