DateTime ExpMonth = Convert.ToInt32(ddExpMonth); ---- DropDown(user selects a month)
DateTime ExpYear = Convert.ToInt32(ddExpYear); ---- Dropdown(user selects year)
Datetime ExpDate = ///// I want this part to be saved as Datetime 02/2012
How is this possible. Or any other way.
A
DateTimevalue doesn’t know about a format – it’s just a date and a time. You can create a newDateTimevalue with the relevant information:… but how that is “saved” is entirely up to you. If you give us more information, we may be able to help you more. You can format it to a string easily enough:
… but that may not be what you’re after.