DateTime toTime= new DateTime.now(); DateTime fromTime= new DateTime(toTime.year, toTime.month, toTime.day); print(toTime); print(fromTime);