I have a date in the pattern I want to change this date in years and months. like this: 26/03/2013 . How can I get the equivalent month and year in the format of
March 2013 in Android?
try {string dateString = "26 / 03/2013 "; SimpleDataformat SDF = New SimpleDormat ("DD / MM / YEA"); Date Date = sdf.parse (dateString); Simple Dataform Output Format = New SimpleDetermutation ("MMMM yyyy"); String formatteddate = output format Format (date); Log D. (TAG, "Date found:" + formatted date); } Hold (ParseException e) {e.printStackTrace (); }
No comments:
Post a Comment