convertStringToDate function
convertStringToDate converts a valid date time string to a DateTime object
Implementation
DateTime convertStringToDate(
{required String dateTimeString, required String format}) {
return DateFormat(format).parse(dateTimeString);
}