SQL DATE_FORMAT

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

Continue reading »

SQL Functions , 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

Continue reading »

SQL Functions , 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

Continue reading »

SQL Functions , 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.

Continue reading »

SQL Functions , , Leave a comment

SQL CASE

SQL CASE is used to provide conditional (if-else) logic in SQL statements.

Continue reading »

SQL Syntax 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.
Continue reading »

SQL Functions , Leave a comment

SQL ADDDATE

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

Continue reading »

SQL Functions Leave a comment

SQL DATEADD

The SQL DATEADD() function is used to add or subtract a time interval to a date.
Continue reading »

SQL Functions , Leave a comment

SQL DAY

The SQL DAY() function is used to get the day (an integer in the range of 1 to 31) from a date expression.

To get the year from a date: SQL YEAR Function.
To get the month from a date: SQL Month Function.
To get the day from a date: SQL Day Function.
Continue reading »

SQL Functions Leave a comment

SQL MONTH

The SQL MONTH() function is used to get the month (an integer in the range of 1 to 12) from a date expression.

If you need to get the year from a date, you could use the SQL YEAR Function.
Continue reading »

SQL Functions 1 Comment