I found the correct solution to my "problem", but even after reading the mysql pages, I do not understand the logic of this.
I currently store login information in my system in the "datetime" field in one of my tables (YYYY-MM-DD hh:mm:ss).
When I want to display data on one of my php pages, just placing the exact field data shows the format mentioned above.
I would THINK, simply using date("Y-m-d",$row["DATE"]), where $row["DATE"]matches a specific string value, will return the desired format.
Instead, I have to use: date("Y-m-d", strtotime($row["DATE"])).
Why is this? My field is $row["DATE"]not a string in the first place. Should I be able to simply reorder the data stored in the datetime field? Wasn't that the goal of restoring my entire table table to accommodate the date and time?
source
share