SELECT * but also use CAST()
casting, mysql, sql
Solution
Just add that column to your `SELECT` clause in addition to the `*`. Make sure to give it an alias so you can differentiate it from the regular datetime field.
SELECT *
, CAST(datefield AS date) AS aliasname
FROM tablename
Problem
I'm trying to select all fields for a number of rows from my MySQL table. One of my fields is called `publication_date` and it stores a string that represents a day that specific row is to be published on our website. It's stored in `mm/dd/yyyy` format. I know I can cast that field to a `DATE` data type using CAST, but I'm not sure how to also grab the other fields' data.