What Are Date And Time Functions In MySQL

What Are Date And Time Functions In MySQL


  • 3 Jan, 2012

    MySQL offers a number of functions for date and time values:► ADDDATE(date, INTERVAL expr unit) - Adding days to a date. Same as DATE_ADD().► ADDTIME(time1, time2) - Adding two time values together.► CURDATE() - Returning the current date. Same as CURRENT_DATE().► CURTIME() - Returning the current time. Same as CURRENT_TIME().► DATE(expression) - Returning the date from the expression.► DATEDIFF(date1, date2) - Returning dates difference in days.► DATE_ADD(date, INTERVAL expr unit) - Adding days to a date.► DATE_SUB(date, INTERVAL expr unit) - Subtracting days from a date.► DATE_FORMAT(date, format) - Returning a character string representing a date.► DAY(date) - Returning an integer representing the day of the month. Same as DAYOFMONTH()► DAYNAME(date) - Returning the name of week day.► DAYOFMONTH(date) - Returning an integer representing the day of the month.► DAYOFWEEK(date) - Returning an integer representing the day of the week.► DAYOFYEAR(date) - Returning an integer representing the day of the year.

    Comments Received:
    Please give your suggestions and feedback:

2009-2016 downloadmela.com. All rights reserved.