DAY() FUNCTION in MySQL

DAY() FUNCTION The MySQL DAY function is used to extract the Day value from a date or datetime value. The various versions of MySQL support the DAY function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: DAY( expression ) Parameters: expression: It is used … Read more

FROM_DAYS() FUNCTION in MySQL

FROM_DAYS() FUNCTION The MySQL FROM_DAYS function is used to get a date value for a numeric day representation. The various versions of MySQL support the FROM_DAYS function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: FROM_DAYS( numeric_day ) Parameters: numeric_day: It is used to … Read more

DAYOFYEAR() function in MySQL

DAYOFYEAR() function The MySQL DAYOFYEAR function is used to get the day of the year value for a date or datetime value. The various versions of MySQL support the DAYOFYEAR function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: DAYOFYEAR( expression ) Parameters: expression: … Read more

DAYOFWEEK() function in MySQL

DAYOFWEEK() function The MySQL DAYOFWEEK function extracts the weekday index from a date or datetime value. The various versions of MySQL support the DAYOFWEEK function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, and MySQL 3.23. Syntax: DAYOFWEEK( expression ) Parameters: expression: It is used to specify the … Read more

DAYOFMONTH() FUNCTION in MySQL

DAYOFMONTH() FUNCTION The MySQL DAYOFMONTH function extracts the Day value from a date or datetime value. The various versions of MySQL support the DAYOFMONTH function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: DAYOFMONTH( expression ) Parameters: expression: It is used to specify the … Read more

DAYNAME() FUNCTION in MySQL

DAYNAME() FUNCTION The MySQL DAYNAME function extracts the weekday name from a date or datetime value. The various versions of MySQL support the DAYNAME function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0, and MySQL 3.23. Syntax: DAYNAME( expression ) Parameters: expression: It is used to specify the … Read more

DATEDIFF() FUNCTION in MySQL

DATEDIFF() FUNCTION The MySQL DATEDIFF function is used to get the difference in days between two date values. The various versions of MySQL support the DATEDIFF function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0 and MySQL 4.1.1. Syntax: DATEDIFF( date1, date2 ) Parameters: date1, date2: They are used to specify the … Read more

DATE_FORMAT() FUNCTION in MySQL

DATE_FORMAT() FUNCTION The MySQL DATE_FORMAT function is used to format a date. The various versions of MySQL support the DATE_FORMAT function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: DATE_FORMAT( date, format_mask ) Parameters: date: It is used to specify the date to be … Read more

DATE_ADD() FUNCTION in MySQL

DATE_ADD() FUNCTION The MySQL DATE_ADD function gets a date value after adding a certain time/date interval. The various versions of MySQL support the DATE_ADD function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: DATE_ADD( date, INTERVAL value unit ) Parameters: date: It is used … Read more

CURDATE() FUNCTION in MySQL

CURDATE() FUNCTION The MySQL CURDATE function is used to get the current date. The various versions of MySQL support the CURDATE function, namely, MySQL 5.7, MySQL 5.6, MySQL 5.5, MySQL 5.1, MySQL 5.0, MySQL 4.1, MySQL 4.0 and MySQL 3.23. Syntax: CURDATE( ) Example 1: mysql> SELECT CURDATE (); Output: ‘2019-07-05’ Explanation: The current date … Read more