007, MySQL date to take the current time, take yesterday

# Take today in text format
 the SELECT 
    DATE_SUB (CURDATE (), INTERVAL 0  DAY ); 

# yesterday to take a text format 
the SELECT 
    DATE_SUB (CURDATE (), INTERVAL 1  DAY );

The results show the following:

 

 

Beginning of the heart do not forget, if you think this article valuable, authors agree to pay, micro-channel two-dimensional code can be any amount of a reward to the author (Micro Signal: 382 477 247) Oh, thank you.

Guess you like

Origin www.cnblogs.com/tianpan2019/p/11841319.html