Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql date between two dates

-- With implicit CAST
SELECT * FROM my_table 
	WHERE my_date BETWEEN '2021-06-01 01:12:00' AND '2021-06-30 23:59:59';
-- is EQUIVALENT to
SELECT * FROM my_table 
	WHERE my_date >= '2021-06-01 01:12:00' AND my_col <= '2021-06-30 23:59:59';
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #mysql #date #dates
ADD COMMENT
Topic
Name
1+4 =