Ejemplo 1: fecha de mysql entre dos fechas
ex1:
SELECT * FROM `objects`
WHERE (date_field BETWEEN '2010-01-30 14:15:55' AND '2010-09-29 10:15:55')
ex2:
WHERE
requireddate BETWEEN
CAST('2003-01-01' AS DATE) AND
CAST('2003-01-31' AS DATE);
Ejemplo 2: fechas de consulta de mysql entre dos fechas
select * from users
where signup_date between '2020-05-01' and '2020-12-10 23:59:59';
// Important with the times,
// otherwize you will not get all records from end date.
// Event if you only have date and no times in signup_date column
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)