Jump to: navigation, search

Mysql DATE

From w3cyberlearnings

Contents

MySQL DATE Function

This function extracts the date part of the date or datetime.

Syntax DATE

  • expre: date or datetime expression
DATE(expre);

Example 1

mysql> SELECT DATE('2012-05-22 03:40:40');
+-----------------------------+
| DATE('2012-05-22 03:40:40') |
+-----------------------------+
| 2012-05-22                  |
+-----------------------------+
1 row in set (0.00 sec)


Related Links



Navigation
Web
SQL
MISC
References