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

python - Healpy: From Data to Healpix map -

c - Bitwise operation with (signed) enum value -

xslt - Unnest parent nodes by child node -