util method to convert date string to diff format date string