Hey people,
Maybe you can help me with this, at the moment within the code of my add button (which updates a database row) I have
m_dtContacts.Rows[m_rowPosition]["DateBooked"] = dateTimePicker.Value;
So this obviously inputs the value that is selected in the dateTimePicker. But then this Displays the date as dd/mm/yyyy which is what I want but then it puts the time after it like this : 12/03/2009 00:00:00.
What i'd like to know is how i can display the Date, without the time following after it i already tried this code which just puts the same Value in:
dateTimePicker.Format = DateTimePickerFormat.Custom;
//Display the date for example, as "Mon 26 Feb 2001".
dateTimePicker.CustomFormat = "ddd dd MMM yyyy";
At this stage i get stuck, so if anyone knows how i could fix it it would be greatly appreciated :)
Loading
Karthikeyan SPosted Apr 13, 2009, 11:33 AM
To display the date-time with your specified format we have to set two properties:
1. Set value as 'ddd dd MMM yyyy' for the property 'CustomFormat'. (Already you have set this property correctly.)
2. Set value as 'Custom' for the property 'Format'.
Thats it, If you have any concern reply back.