Answers for "java date month year now"

2

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);
Posted by: Guest on May-18-2021
0

java get year from date

SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Date date = format.parse(datetime);
SimpleDateFormat df = new SimpleDateFormat("yyyy");
year = df.format(date);
Posted by: Guest on October-08-2020

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language