Value A DateTime does not know about the format - it is just a date and time. You can create a new DateTime value with the relevant information:
DateTime expiry = new DateTime(Convert.ToInt32(ddExpYear), Convert.ToInt32(ddExpMonth), 1);
... but how it is "saved" is entirely up to you. If you give us more information, we can help you more. You can easily format it to a line:
string formatted = expiry.ToString("yyyy/MM");
... but it may not be like you.
Jon skeet
source share