removeMillis property

DateTime get removeMillis

Returns DateTime object without millisecond and smaller.

New instance will have anything smaller than second as 0.

  final dateOnly = DateTime.now();  // 16-09-2023 16:44:26:234567Z
  dateOnly.onlyDate;                // 16-09-2023 16:44:26:000000Z

Implementation

DateTime get removeMillis => DateTime(year, month, day, hour, minute, second);