I have a doubt that when I am converting a String to date then It will return it as:
Sun Apr 30 00:00:00 GMT+05:30 2017
but I want the format to be as:
2017-04-30
Date last_date_date = new SimpleDateFormat("yyyy-MM-dd").parse("2017-04-30");
So Which method I need to apply for that?
Your code is working well, here is a proof:
OUTPUT: