How to convert the string into month and year" example mfgdate is a string that value is "10/2014" how to convert ?
please help me..
Loading
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.
Venkat KumarPosted Apr 21, 2015, 7:25 AM
var arr = mmDDYYY.split("/");
return new Date(arr[2],arr[0]-1,arr[1]);
}
alert( toDate("07/31/2014") );
go through this link http://jsfiddle.net/oc45w9c3/
Don't forget to accept the answer if it matches your requirement.
aravinth kandasamyPosted Apr 21, 2015, 6:56 AM
Nanhe SiddiquePosted Apr 21, 2015, 6:54 AM
aravinth kandasamyPosted Apr 21, 2015, 6:45 AM
Venkat KumarPosted Apr 21, 2015, 6:40 AM
DateTime d = Convert.ToDateTime("10/2014");
Response.Write(d.ToString("MMM/yyyy"));
Output : Oct/ 2014
Dipankar BiswasPosted Apr 21, 2015, 6:23 AM
See This link.. To help..https://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx