convertDate
Method to convert one date format to another format
Return
String formatted String date according to your provided format, in case of parse error it will send default string date provided
Parameters
date
String date in any date format like dd-mm-yyyy
defaultFormat
provide default String format in which you are passing your date
formatWanted
provide string format in which you want it.