Mysql Date Type

Ads
 

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.

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)

 

Ads

Ads