Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SQL

today midnight SQL

#Today midnight is same as the next day at 0000hrs
#today at 23:59:59
SELECT (CURDATE()+ INTERVAL 1 DAY - INTERVAL 1 SECOND); #return
#tomrrow at 0000hrs
# You can skip adding the timesamp
SELECT TIMEsTAMP(CURDATE()+ INTERVAL 1 DAY);
Source by www.sqlservercentral.com #
 
PREVIOUS NEXT
Tagged: #today #midnight #SQL
ADD COMMENT
Topic
Name
9+2 =