MySQL DATE Function

The MySQL DATE function extracts the date part of a date or date/time expression. The equivalent
function in Microsoft SQL Server is somewhat DATEPART, but the CONVERT function may provide a better result depending on the required format.

Employees Table

employeeID

employeeName

accountCreated

1000

John Smith

1995-12-03 13:23:30.657

1001

Fred White

2001-10-12 09:41:44.125

1002

Jane Scott

1998-05-01 11:36:16.334

1003

Samuel Williams

1991-01-03 15:19:51.293

In this example, we want to find out what date the employees' accounts were created.

Did you find something wrong with the information on this page? Please take a moment to report it to us
so that we can continue to improve the quality of the information on this site. Click here to
report an issue with this page.