Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql date minus 1 day

 SELECT SYSDATE();								-- 2021-07-13 06:12
 SELECT DATE_ADD(SYSDATE(), INTERVAL 1 DAY);	-- 2021-07-14 06:12
 SELECT DATE_ADD(SYSDATE(), INTERVAL -1 DAY);	-- 2021-07-12 06:12
 SELECT DATE(SYSDATE());						-- 2021-07-13 00:00
 
 -- ⇓ Test it ⇓ (Fiddle source link)
Source by sqlfiddle.com #
 
PREVIOUS NEXT
Tagged: #mysql #date #day
ADD COMMENT
Topic
Name
8+1 =