Date format problem
In my web application(developing using C#, ASP.NET 2.0), i m showing date to the user for last 7 days starting from today's date in the form Monday, June 23, 2008.
for (int intDay = 7; intDay > 1; intDay--)
//strPass = DateTime.Now.ToString();
strDdlDate = DateTime.Now.AddDays(intDay-7).ToLongDateString();
ddlDate.Items.Insert(0, new ListItem(strDdlDate, strDdlDate));
ddlDate.SelectedValue = DateTime.Now.ToLongDateString();
I am loading all these dates in the dropdown. Now the problem is that if the user selects any date it will be in the form as i have mentioned above. How can i convert the selected date into MM/DD/YYYY format, so that i can pass it to Database.