I am trying to create a table with one column in date format. Below is my code for doing so:
CREATE TABLE Sales
(`CustomerID` int, `mydate` date, `amount` float(2))
;
INSERT INTO Sales
(customerID, mydate, amount)
VALUES
(10, 8/2/96, 2540.78),
(20, 1/30/99, 1800.54),
(30,7/14/95, 460.33),
(10, 6/29/98,2400),
(50, 2/3/98, 600.28),
(60, 3/2/98, 720),
(10, 7/6/98, 150)
;
But my outcome is always:
10|0|2540.78
20|0|1800.54
30|0|460.33
10|0|2400.0
50|0|600.28
60|0|720.0
10|0|150.0
So basically the date column is only showing 0.
I am using this online IDE to help me execute this code (it's an online IDE executing MySQL I believe): https://www.tutorialspoint.com/execute_sql_online.php
I tried change the data type to "timestamp" or "datetime" but none of them work. Any help is appreciated!