The SQL DATE_SUB is a mySql function, unlike SQL DATE_ADD function which add time value, SQL DATE_SUB will subtract time values (intervals) from a date value.
MySQL DATE Function
MySQL DATE() function is used to get the date part of a date/time expression.
SQL DATE_FORMAT() is a MySQL function which returns date/time in your requested format.
SQL CURTIME is a MySQL function which returns current time based on server system.
Note: MySQL has 3 similar functions:
SQL NOW() : return date and time
SQL CURDATE(): returns date
SQL CURTIME: returns time
The SQL DATEDIFF() function is used to get the date/time difference of 2 date expressions. It is supported by both SQL Server and MySQL, but the syntax is different.
The SQL DATE_ADD is a mySql function which is same as SQL ADDDATE(), it’s used to add time values (intervals) to a date value.
SQL ADDDATE() is MySQL function used to add/subtract a time interval to a date expression.
The SQL DATEADD() function is used to add or subtract a time interval to a date.