I am trying to write a query that returns only the rows which has Datetime to be between the day 01 of the month and current day. But I am not sure if it is possible to do. So, I am aware of the function NOW()
that gives me the current DATETIME but I still don't know how to get the other end of BETWEEN
automatically since its a web application and i don't want to make the user input the datetime.
Ex: I want all the orders that were made during the month where you are consulting.
Select * from orders where date between (the function I am looking for) and NOW();