toDateTimeOrNull method

DateTime? toDateTimeOrNull()

Tries to parse the string into a DateTime, returning null if parsing fails.

Implementation

DateTime? toDateTimeOrNull() => DateTime.tryParse(this);