MySQL

Function NameDescription
ADDDATE(<expression>, <days>)Adds the specified number of days to the date value in the expression.
ADDTIME(<expression>, <time>)Adds the specified amount of time to the date or datetime expression value.
CURRENT_DATEObtains the current date value.
CURRENT_TIMEObtains the current time value in the local time zone.
CURRENT_TIMESTAMPObtains the current date and time in the local time zone.
DATE(<expression>)Extracts the date from a datetime expression.
DATEDIFF(<expression1>, <expression2>)Subtracts the second datetime expression from the first datetime expression and returns the number of days between the two.
DATE_ADD(<expression>, INTERVAL <interval> <quantity>)Adds the specified interval quantity to the date or date ...

Get SQL Queries for Mere Mortals: A Hands-On Guide to Data Manipulation in SQL, Second Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.