java - I want to Change Date Format -


i want change date 3 7 2015 3aug 2015

i have date value :

int day=3,month =7 ,year =2015 

it's simple try below sample code :-

import java.text.simpledateformat; import java.util.calendar;  public class dateformatter {      public static void main(string[] args) {          calendar cal = calendar.getinstance();         cal.set(2015, 7, 3);          simpledateformat sdf = new simpledateformat("dmmm yyyy");          system.out.println("formatted date :  " + sdf.format(cal.gettime()));     }  } 

output

formatted date :  3aug 2015 

Comments

Popular posts from this blog

Upgrade php version of xampp not success -

amazon web services - S3 and apache mod_proxy with basic authentication -

powershell - This solution contains one or more assemblies targeted for the global assembly cache -