diff --git a/src/controllers/tanksController.js b/src/controllers/tanksController.js index 67ab1693..635a2978 100644 --- a/src/controllers/tanksController.js +++ b/src/controllers/tanksController.js @@ -397,7 +397,7 @@ exports.getTankmotordata = async (req, reply) => { // Convert input dates to ISO 8601 format for Date comparison const start = moment(startDate, "DD-MMM-YYYY - HH:mm").toDate(); - const end = moment(stopDate, "DD-MMM-YYYY - HH:mm").toDate(); + const end = moment(stopDate, "DD-MMM-YYYY - HH:mm").endOf('day').toDate(); // Convert input dates to string format for string-based comparison