DATE() in MySQL Last Updated : 15 Jul, 2025 Suggest changes Share Like Article Like Report The DATE() function in MySQL is designed to extract the date portion (year, month, and day) from a given date, datetime or timestamp value. In this article, We will learn about DATE() in MySQL by understanding their examples.DATE() in MySQLIn MySQL the DATE() function is used to extract the date part (year, month, and day) from a given date, datetime or timestamp value. This function helps to remove the time component from datetime values and leaves only the date which is useful in various database operations where the time part is unnecessary.Syntax:DATE(expression)expression: This can be a date, datetime, or timestamp value from which you want to extract the date.Examples of DATE() Below are some common examples or usages of the DATE() function : Example 1: Extracting date from a given date. SELECT DATE('2024-09-11 12:34:56');Output: 2024-09-11Example 2: Extracting date from a given DateTime. Select DATE("2020-06-23 10:34:29"); Output: 2020-06-23 Example 3: Extracting date from a given date. SELECT DATE("The date is 2020-06-23"); Output: NULL ConclusionThe DATE() function in MySQL is a crucial tool for extracting the date portion from datetime or timestamp values. It simplifies queries where only the date component is relevant, and it gracefully handles invalid formats by returning NULL. Create Quiz B bansal_rtk_ Follow 0 Article Tags : MySQL DBMS-SQL mysql Explore MySQL BasicsWhat is MySQL?5 min readMySQL DATE Data Type2 min readHow to Install MySQL on Windows?4 min readHow to Install MySQL on Linux?5 min readHow to Install MySQL on macOS?5 min readHow to Install MySQL on Fedora?5 min readHow to Install SQL Workbench For MySQL on Windows?5 min readHow to Install MySQL WorkBench on Ubuntu?3 min readHow to Install SQL Workbench For MySQL on Linux?2 min readConnecting to MySQL Using Command Options3 min readJava Database Connectivity with MySQL2 min readConnect MySQL database using MySQL-Connector Python2 min readHow to make a connection with MySQL server using PHP ?3 min readHow to Connect to Mysql Server Using VS Code and Fix errors?4 min readHow to Connect Node.js Application to MySQL ?2 min readMySQL User ManagementMySQL CREATE USER Statement4 min readMySQL | DROP USER3 min readMySQL | USER( ) Function3 min readMySQL | Change User Password3 min readMySQL Managing DatabasesMySQL Create Database Statement4 min readMySQL Drop Database3 min readPython MySQL - Create Database2 min readNodeJS MySQL Create Database2 min readMySQL Managing TablesMySQL CREATE TABLE4 min readMySQL RENAME TABLE Statement5 min readMySQL Temporary Table5 min readDrop Multiple Tables in MySQL3 min readInserting data into a new column of an already existing table in MySQL using Python2 min readPython: MySQL Create Table3 min readPHP | MySQL ( Creating Table )3 min readNode.js MySQL Create Table2 min readCreate Table From CSV in MySQL3 min readNode.js MySQL Drop Table2 min readPython MySQL - Drop Table2 min readHow to Rename a MySQL Table in Python?3 min readMySQL QueryNested Select Statement in MySQL5 min readMySQL DISTINCT Clause4 min readINSERT() function in MySQL2 min readMySQL Derived Table5 min readMySQL Insert Multiple Rows5 min readMySQL INSERT INTO SELECT Statement5 min readMySQL INSERT ON DUPLICATE KEY UPDATE Statement3 min readMySQL Insert Date Time4 min readMySQL UPDATE Statement6 min readMySQL DELETE Statement6 min readHow to Delete Duplicate Rows in MySQL?4 min readMySQL - ON DELETE CASCADE Constraint3 min readTruncate All Tables in MySQL2 min readPHP | Inserting into MySQL database6 min readPython MySQL - Update Query2 min readPHP | MySQL UPDATE Query2 min readNode.js MySQL Update Statement2 min readMySQL ClausesMySQL WHERE Clause5 min readMySQL ORDER BY Clause5 min readMySQL | PARTITION BY Clause2 min readQueries using AND ,OR ,NOT operators in MySQL2 min readMySQL EXISTS Operator6 min readMySQL Aggregate FunctionsCOUNT() Function in MySQL3 min readSUM() Function in MySQL4 min readAVG() Function in MySQL2 min readMySQL Data ConstraintsMySQL NOT NULL Constraint4 min readMySQL Primary Key4 min readMySQL FOREIGN KEY Constraint7 min readMySQL COMPOSITE KEY4 min readMySQL UNIQUE Constraint4 min readMySQL DEFAULT Constraint3 min readMySQL Joining DataMySQL Inner Join7 min readMySQL LEFT JOIN5 min readMySQL RIGHT JOIN5 min readMySQL SELF JOIN5 min readMySQL CROSS JOIN5 min readMySQL UPDATE JOIN6 min readMySQL DELETE JOIN4 min readMySQL | Recursive CTE (Common Table Expressions)5 min readMySQL FunctionsDATE() in MySQL2 min readTRUNCATE() Function in MySQL6 min readMathematical functions in MySQL3 min readMySQL | CONVERT( ) Function2 min readLTRIM() Function in MySQL2 min readUCASE() or UPPER() Function in MySQL1 min readRTRIM() Function in MySQL3 min readMySQL ISNULL( ) Function2 min readIFNULL in MySQL1 min readMySQL CASE() Function4 min readMySQL | CAST( ) Function3 min readMYSQL View11 min read My Profile ${profileImgHtml} My Profile Edit Profile My Courses Join Community Transactions Logout Like