N
N
Nicholas of Denmark2016-05-04 08:55:00
MySQL
Nicholas of Denmark, 2016-05-04 08:55:00

How to write a query to the MySQL database with a selection by date?

How to write a query to the MySQL database to get all the data for a certain calendar month (there is a date field in the database)?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
R
Rsa97, 2016-05-04
@nikolaydatskiy

SELECT * 
  FROM `table` 
  WHERE `date` BETWEEN '2016-05-01' AND LAST_DAY('2016-05-01')

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question