Getting Names for Months and Days : Introduction : Date Time Functions MySQL TUTORIALS


MySQL TUTORIALS » Date Time Functions » Introduction »

 

Getting Names for Months and Days


There are two functions that can be used to look up month and day names for a given date:

MONTHNAME(date)

DAYNAME(date)

MONTHNAME(date) can be used to obtain the name of the month in which date occurs as a string

mysql>
mysql> SELECT MONTHNAME('0-2-1');
+--------------------+
| MONTHNAME('0-2-1') |
+--------------------+
| February           |
+--------------------+
row in set (0.00 sec)

mysql>



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

MySQL TUTORIALS

 Navioo Date Time Functions
» Introduction