Archive for the Category: SQL Functions

SQL EXTRACT (MySQL Function)

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.

Tagged , Leave a comment

SQL QUARTER

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).

Tagged , Leave a comment

SQL DATE_SUB

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.

Tagged , Leave a comment

MySQL DATE Function

MySQL DATE() function is used to get the date part of a date/time expression.

Tagged , Leave a comment

SQL DATE_FORMAT

SQL DATE_FORMAT() is a MySQL function which returns date/time in your requested format.

Tagged , 1 Comment

SQL CURTIME

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

Tagged , Leave a comment

SQL CURDATE

SQL CURDATE is a MySQL function which returns current date based on server system. Note: MySQL has 3 similar functions: SQL NOW() : return date and time SQL CURDATE: returns date SQL CURTIME: returns time

Tagged , Leave a comment

SQL DATEDIFF

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.

Tagged , , Leave a comment

SQL DATE_ADD

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.

Tagged , Leave a comment

SQL ADDDATE

SQL ADDDATE() is MySQL function used to add/subtract a time interval to a date expression.

Leave a comment