I'm writing a simple insert query. Here's the table:
+--------+-------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------+-------------+------+-----+---------+-------+ | name | varchar(20) | YES | | NULL | | | course | varchar(50) | YES | | NULL | | | sdate | date | YES | | NULL | | | edate | date | YES | | NULL | | +--------+-------------+------+-----+---------+-------+ Here's the query:
insert into dummy values('Tanzeel', 'SQL Bootcamp', 5/28/2020 12:00 AM, 11/20/2020 12:00 AM); insert into dummy values('John', 'ReactJS for Beginners', 6/28/2020 12:00 AM, 10/20/2020 12:00 AM); But I'm getting this error:
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '12:00 AM, 11/20/2020 12:00 AM)' at line 1
Clearly something is wrong with Date format, so I checked this link:
Date and Time Conversions Using SQL Server
I tried putting dates in single quotes which the gives this error:
ERROR: 1292 (22007): Incorrect date value: '5/28/2020 12:00 AM' for column 'sdate' at row 1
I've also tried these formats:

YYYY-MM-DD hh:mm:ss. Once inserted correctly, you can use the functions listed in the link you shared to "read" these dates and format that output.