fromFormat method

DateTime? fromFormat(
  1. String format
)

Implementation

DateTime? fromFormat(String format) {
  try {
    final parsedDate = DateFormat(format).parse(this);
    return parsedDate;
  } catch (exception) {
    debugPrint('$exception');
    return null;
  }
}