I am having trouble on query BETWEEN two dates, what I want is when the user have event will return true and if not then false
The startDate value in my database are 2022-05-01 23:59
the date i get on my form are 14/04/2022 03:32 PM
SELECT assignedTo, startDate FROM Event WHERE assignedTo LIKE '%" + userId + "%' AND startDate BETWEEN " + moment(date).startOf(`day`).format() + " AND " + moment(date).endOf(`day`).format()
the value of moment(date).endOf(day).format() is Invalid date