Syntax of NOW()
Output is 2016-09-17 16:49:41 , this is in the format YYY-MM-DD HH:MM:SS
Now as a number
Yesterday & Tomorrow date by usign NOW()
SELECT NOW()- interval 1 day as Yesterday, NOW() as Today, NOW()+ interval 1 day as Tomorrow
|2018-12-11 05:29:04||2018-12-12 05:29:04||2018-12-13 05:29:04|
Last Month , Today and Next Month
SELECT NOW()- interval 1 month as LastMonth, NOW() as Today, NOW()+ interval 1 Month as NextMonth
|Last Month||Today||Next Month|
|2018-11-12 05:29:04||2018-12-12 05:29:04||2019-01-12 05:29:04|
Adding current date and time by default to a record.
While storing a record MySQL can automatically insert date and time in a column.
Read more on how to store default date and time in MySQL table here.