I am getting date into string in YYYY/MM/DD HH:MM:SS format.I want to change it into the mm/dd/yyyy HH:mm:ss and also it will show AM and PM how ca
YYYY/MM/DD HH:MM:SS
mm/dd/yyyy HH:mm:ss
just use the Time class. Try something similar to this.
Time time = new Time(); time.set(Long.valueOf(yourTimeString));
If you really need a Date object just try this.
Date date = new Date(Long.parse(yourTimeString));