When i print the selected date on Calendar1_SelectionChanged event it prints: 1/29/2011 12:00:00 AM
When i print the selected date on Calendar1_SelectionChanged event it prints: 1/29/2011 12:00:00 AM
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Because a DateTime always comes with a date and a time. A calendar control only produces a date, but since you can’t have a DateTime without a time part, it just sets the time to 00:00:00. You can ignore the time part.
If you want to print the date without the meaningless time part, use the
ToShortDateStringmethod or something similar.