Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

get year month day from date string java

SimpleDateFormat sdf = new SimpleDateFormat("dd/MM/yyyy");  
Date parse = sdf.parse("18/08/2012");  
Calendar c = Calendar.getInstance();  
c.setTime(parse);  
System.out.println(c.get(Calendar.MONTH) + c.get(Calendar.DATE) + c.get(Calendar.YEAR));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #year #month #day #date #string #java
ADD COMMENT
Topic
Name
9+9 =