I am getting datetime as 1/2/2010 11:29:30 which I am displaying in a gridview.
and I want to convert it to “Feb 1, 2010 at 11:29”.
Please let me know how to convert it like this.
Thanks in advance.
Note: I am using asp.net with C#.
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 the ToString method of
DateTime, it is extremely useful in formating your dates. Here is a quick example:For a reference on other formatting options, see here.