toDateTime property

String get toDateTime

Formats date and time as '24th, Feb 2024 - 10:30 PM'.

Example:

final date = DateTime(2024, 2, 24, 22, 30);
final formatted = date.toDateTime;
// returns: '24th, Feb 2024 - 10:30 PM'

Implementation

String get toDateTime => '$toDdMmmYyyy - $toTimeAmPm';