The SQL EXTRACT() function is used to get a value (year, month, day, hour, minute, etc.) from a date/time expression. It’s supported by MySQL and Oracle, but the syntax is different. In this post we’ll discuss it’s syntax and example in MySQL.
SQL QUARTER is a MySQL function which also supported by Ingres database. It will return the quarter of a date expression as an integer (in the range of 1-4).
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.
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.
SQL ADDDATE() is MySQL function used to add/subtract a time interval to a date expression.