Mysql Year of Date

Mysql Year of Date is used to return the current year of the table in database.

Ads

Mysql Year of Date

     

Mysql Year of Date is used to return the current year of the table in database.

Understand with Example

The Tutorial illustrate an example from 'Mysql Year of Date'. To understand and grasp the example we use the following query (current_date) that return the current year of  the table.

Current_Date: The Query is used to return the current year of the date in a  table as fieldname YEAR(CURRENT_DATE).

In this example to show the year of a date.

Query to show the year of a Current Date

mysql> SELECT YEAR(CURRENT_DATE);
+--------------------+
| YEAR(CURRENT_DATE) |
+--------------------+
| 2009 |
+--------------------+
1 row in set (0.00 sec)

Advertisements

Share on Google+Share on Google+

Mysql Year of Date

Posted on: January 20, 2009 If you enjoyed this post then why not add us on Google+? Add us to your Circles

Advertisements

 

Discuss: Mysql Year of Date   View All Comments

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:0

Ads

 

Ads