Could any one help me on below code, When i try to execute the below code. i am getting the below as a output, Please Correct me to convert same Date. with below format.
current output:
Tue Jan 23 00:05:00 IST 2018
Expected Output:
Tue May 23 00:05:00 IST 2018
public class Testing {
public static void main(String[] args) throws ParseException {
String format = "yyyy-mm-dd";
String date = "2018-05-23";
Date date2 = new SimpleDateFormat(format).parse(date);
System.out.println(date2);
}
}