Here is the list of date functions in MySQL.
- ADDDATE: Adds time/date interval to date and then Gives out the date
- ADDTIME: Adds time interval to a time/DateTime and then Gives out the time/DateTime
- CURDATE: Gives out the current date
- CURRENT_DATE: Gives out the current date
- CURRENT_TIME: Gives out the current time
- CURRENT_TIMESTAMP: Gives out the current date and time
- CURTIME: Gives out the current time
- DATE: Gives out the date part from a DateTime expression
- DATEDIFF: Gives out the number of days between two date values
- DATE_ADD: This function adds time/date interval to date and then Gives out a date
- DATE_FORMAT: This function formats date
- DATE_SUB: This function subtracts a time/date interval from a date and then Gives out the date
- DAY: Gives out the day of the month for a given date
- DAYNAME: Gives out the weekday name for a given date
- DAYOFMONTH: Gives out the day of the month for a given date
- DAYOFWEEK: Gives out the weekday index for a given date
- DAYOFYEAR: Gives out a day of the year for a given date
- EXTRACT: This function gives out a part from a given date
- FROM_DAYS: Gives out a date from a numeric date value
- HOUR: Gives out hour part for a given date
- LAST_DAY: This function extracts the last day of the month for a given date
- LOCALTIME: Gives out the current date and time
- LOCALTIMESTAMP: Gives out the current date and time
- MAKEDATE: This function both creates and returns a date based on a year and several days value
- MAKETIME: This function both creates and returns a time based on an hour, minute and second value
- MICROSECOND: Gives out the microsecond part of a time/DateTime
- MINUTE: Gives out the minute part of a time/DateTime
- MONTH: Gives out the month part for a given date
- MONTHNAME: Gives out the name of the month for a given date
- NOW: Gives out current date and time
- PERIOD_ADD: This one adds the specified number of months to a period
- PERIOD_DIFF: Gives out the difference between two periods
- QUARTER: Gives out the quarter of the year for a given date value
- SECOND: Gives out seconds part of a time/DateTime
- SEC_TO_TIME: This returns a time value based on the specified seconds
- STR_TO_DATE: This returns a date based on the string and a format
- SUBDATE: This function subtracts a time/date interval from a date and then Gives out a date
- SUBTIME: This function removes a time interval from a DateTime and then Gives out the time/DateTime
- SYSDATE: Gives out current date and time
- TIME: Extracts time part from a given time/DateTime
- TIME_FORMAT: This function formats a time by a specified format
- TIME_TO_SEC: This one converts a time value into seconds
- TIMEDIFF: Gives out the difference between two time/DateTime expressions
- TIMESTAMP: This one returns a DateTime value based on a date or DateTime value
- TO_DAYS: Gives out the number of days between a date and date "0000-00-00."
- WEEK: Gives out the week number for a given date
- WEEKDAY: Gives out the weekday number for a given date
- WEEKOFYEAR: Gives out the week number for a given date
- YEAR: Gives out the year part for a given date
- YEARWEEK: Gives out the year and week number for a given date
- Log in to post comments