toDate method

String toDate({
  1. required String format,
})

for convert into date with given format

Implementation

String toDate({required String format}) =>
    DateFormat(format).format(DateTime.parse(this)).toString();