Search
 
SCRIPT & CODE EXAMPLE
 

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));
Comment

get day from date month year java

Calendar cal = Calendar.getInstance();
cal.set(year,month-1,day);
int nd = cal.get(Calendar.DAY_OF_WEEK);
Comment

PREVIOUS NEXT
Code Example
Java :: java string regexp replace 
Java :: how to check the end of a string java 
Java :: how to modify string in java 
Java :: discord jda 
Java :: measure running time of a statement java 
Java :: for loop javasctip 
Java :: Getting Pending intent for 12 version 
Java :: print list of map java 
Java :: viewpager2 dependency 
Java :: retainall java 
Java :: arraylist syntax in java 
Java :: java arraylist declaration 
Java :: how to find the length of a string in java without using length function 
Java :: java string array initialization 
Java :: android:windowLightStatusBar programmatically 
Java :: how to check base64 in java 
Java :: Java How to use Set? 
Java :: java string not equal 
Java :: this in java 
Java :: radio button android:inputType 
Java :: gradle could not determine java versionAdd Answer 
Java :: dot operator java 
Java :: getcolor deprecated android 
Java :: make textview invisible android 
Java :: one line if statement java 
Java :: reviews button ade android studio 
Java :: input long in java 
Java :: use regex in if statement java 
Java :: apache csv get headers 
Java :: java get jar execution directory 
ADD CONTENT
Topic
Content
Source link
Name
2+6 =