Latest Tutorials| Questions and Answers|Ask Questions?|Site Map



Home Sql Sqldate Mysql Date Type

Related Tutorials


 
 

Share on Google+Share on Google+

Mysql Date Type

Advertisement
Mysql Date Type is used to show the date in "yyyy-mm-dd" format.The Date Type is used when you want to display the date but not time.

Mysql Date Type

     

Mysql Date Type is used to show the date in "yyyy-mm-dd" format.The Date Type is used when you want to display the date but not time.

Understand with Example

The Tutorial helps you to understand an example from 'Mysql Date Type'. To understand this example we use select query that return you the 'emp_dob ' records in 'yyyy-mm-dd' format.

select emp_dob from employee: The select query return the emp_dob  records in "yyyy-mm-dd" format.

The Date Type is used when you want to display date only but not time.It is only in "yyyy-mm-dd" format.

 Output :

mysql> select emp_dob from employee;
+------------+
| emp_dob |
+------------+
| 1985-11-07 |
| 1983-11-07 |
| 1984-10-06 |
| 1982-01-05 |
+------------+
4 rows in set (0.00 sec)

 

Advertisement

If you enjoyed this post then why not add us on Google+? Add us to your Circles



Liked it!  Share this Tutorial


Follow us on Twitter, or add us on Facebook or Google Plus to keep you updated with the recent trends of Java and other open source platforms.

Posted on: January 20, 2009

Related Tutorials

Discuss: Mysql Date Type  

Post your Comment


Your Name (*) :
Your Email :
Subject (*):
Your Comment (*):
  Reload Image
 
 
Comments:1
ASHUTOSH
December 27, 2011
date conversion function in mysql

What is query command to send the date into date type field into mysql from javaservlet? The javaservlet receive the data value like 27-dec-2011 or 27-12-2011 from html input box and sent this date data into mysql's date type column.
DMCA.com