Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

mysql sysdate - 1 day

 -- Sysdate in MySQL
 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 #sysdate #day
ADD COMMENT
Topic
Name
8+5 =