Here we will see how to do the reverse of it. i.e. converting date string of mm/dd/yyyy or dd/mm/yyyy to date object.