How to convert a date having the following format
September 22nd 2015, 10:39:42 am
to
09/22/2015 10:39:42
You need 2 date formats (and essentially you need 2 steps to perform the task) :
September 22nd 2015, 10:39:42 am
using a relevant date format string in order to get/convert it to date objectdd/MM/yyyy HH:mm:ss
format to get the date output.I am leaving the implementation details for you to learn and explore.
Tutorial for parsing & formatting using the new Date & Time API