toDateString function
Implementation
String? toDateString(dynamic value, {String? format, String? formatIn}) {
var date = toDate(value, format: formatIn);
if (date == null) return null;
try {
return DateFormat(format).format(date);
} catch (e) {
return null;
}
}