I have string like this:
Mon, 14 May 2012 13:56:38 GMT
Now I just want only date i.e. 14 May 2012
What should I need to do for that?
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.
The proper way to do it is to parse it into a
Dateobject and format this date object the way you want.Output:
This code is
than any solution relying on splitting strings, substrings on fixed indexes or regular expressions.