dhj Posted January 26, 2004 Posted January 26, 2004 hi i'm doing a web application using .net and c# i have three dropdownlists to represent Date,Month and year my problem is when i try to save this date to the database i need to convert this values to the type DateTime when i'm trying to convert this it's giving me a error saying cannot convert string values to DateTime What can i do ? is there anyway to slolve this problem? thanks in advance Quote
dhj Posted January 26, 2004 Author Posted January 26, 2004 i found a answer by my own string dateString =dropdownlist1.selectedItem.Text+"/" + dropdownlist2.selectedItem.Text + "/" + dropdownlist3.selectedItem.Text; DateTime convertedDate = DateTime.Parse(dateString); this is how i did it Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.