Java SimpleDateFormat always returning January for Month

Change the pattern string from “yyyy/MM/DD” to “yyyy/MM/dd”

SimpleDateFormat sdf = new SimpleDateFormat("yyyy/MM/dd");

Leave a Comment