NOW() : Current Date & Time in MySQLSyntax 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()
Last Month , Today and Next Month
Matching only date part ( not time ) with datetime field or Now()We may store date with time in a table in the above mentioned date and time format. However we can compare the date part only ( without time ) to match the records. Example : We may be storing date and time of login of members in a table but want display all the login members of today or a particular date.
To match current or today's date
Adding current date and time by default to a record.While storing a record MySQL can automatically insert date and time in a column.
This article is written by plus2net.com team.
▼ More on Date & Time functions in SQL