net 4 and c#.
I have in a Text Box DateTimeValue
3/1/2011 12:00:00 AM
I need to convert it in a String of this format:
Format="yyyy-MM-dd"
Any idea how to do it?
PS: I can remove information about the time
Thanks for your time
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.
Use DateTime.ParseExact like so:
Be sure to specify the culture, because the format you used is ambiguous.