Save sqlinsertwithcode.php from beginnerssite as sqldates.php in intermediatesite.  Use PHPMyAdmin to create a new table called task with two fields: a primary key datetime called tasktime and a varchar called task

The task table

Amend the database connection code in sqldates.php to use the correct database if needed.

Dates have always caused problems in computing as they are not normal numbers.  SQL copes well with dates (unlike PHP) but it still takes a bit of effort.