I want to query the records while their insertion date is between two dates and that is like this:
SELECT `products`.`Product_Name`, `products`.`Product_Type`, `products`.`Product_Date` Where
`products`.`Product_Date` between CONCAT(YEAR(CURRENT_DATE),"-
",MONTH(CURRENT_DATE),"-","01") and (LAST_DAY(CURRENT_DATE))
the result in MySql Is like this:
but in the server-side (I use Node.js) the result is different and that is like this
[
{"Product_Name":"Water","Product_Type":"Large","Product_Date":"2018-03-24T18:30:00.000Z"},
{"Product_Name":"Water","Product_Type":"Small","Product_Date":"2018-03-24T18:30:00.000Z"},
{"Product_Name":"Water","Product_Type":"Large","Product_Date":"2018-02-28T18:30:00.000Z"},
{"Product_Name":"Water","Product_Type":"Large","Product_Date":"2018-03-30T18:30:00.000Z"}
]
I want to query the inserted products in the current month from 1st till last date of current month, I get the right result in mysql but wrong result in the server node js, in the third object it shows also the previous month date too. not only that, even the format of the date is also different in the server side
