removeMicros property

DateTime get removeMicros

Returns DateTime object without microsecond.

New instance will have anything smaller than millisecond as 0.

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

Implementation

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