the code looks good to me, but I guess you can't convert a text column to "datetime" automatically; i.e. you don't have valid dates in the date column.
Also note that your $date format: a) won't sort right, b) has no year, so it will mess up after a year. It's much easier to just insert NOW() instead of creating your own representation of "right now".