Ripper (7) [Avatar] Offline
This control actually returns a DateTime object containing the chosen year month and date, but as I scaned the returned value it seemed that it also returns the current hour, second, milisecon...etc. Is there a way to keep only the year month and date and null all other values?

P.S. Now that I have the chance to say it - This book is all that a beginner window programmer can dream of!
Thank you Erik smilie
eebrown (89) [Avatar] Offline
Re: DateTimePicker
Glad you're enjoying the book. Yes, the DateTime structure contains the year, month, day, as well as the hour, minute, second, and then some. You can get the date only with the Date property:

....DateTime myDate;
....return myDate.Date; // gives you the date only