Converted a numeric value to the DATE conversion type. : CAST « Function « SQL / MySQL






Converted a numeric value to the DATE conversion type.

      
mysql>
mysql>
mysql> SELECT CAST(20041031 AS DATE);
+------------------------+
| CAST(20041031 AS DATE) |
+------------------------+
| 2004-10-31             |
+------------------------+
1 row in set (0.00 sec)

   
    
    
    
    
    
  








Related examples in the same category

1.Get the date of birth as one alphanumeric value.
2.Use the CAST( ) function
3.Cast value to signed integer
4.Cast birthday to char type
5.Cast null to char type
6.Type Conversion (Cast)
7.Assign by calculation