Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql one week ago

SELECT sysdate() - 7; 				-- 1 week ago   12/01/2021 14:27:27
SELECT date(sysdate() - 7); 		-- 1 week ago   12/01/2021 00:00:00

SELECT * FROM my_table WHERE my_datecol > date(sysdate() - 7);
 
PREVIOUS NEXT
Tagged: #mysql #week
ADD COMMENT
Topic
Name
8+8 =