Hi i'm a new coder and messed up on my sql table. Instead of storing my date with a timestamp I made the date in three separate columns: day, month, and year. I now realized that I need these in a timestamp. So I can perform more complicated queries.
Here is what I need the UPDATE to look like:
UPDATE coding_tracker SET coded_at = column(day)"/"column(month_number(month))"/"column(year);
Thank you in advance
Assuming your columns are called day, month_number and year, this query should work:
In the case where your
monthcolumn is a name, you can change%min the above query to%bfor short month names (Jan..Dec) or%Mfor long month names (January..December) e.g. for long names:Documentation about formats for
STR_TO_DATEcan be found in theDATE_FORMATsection of the MySQL manual.