FYI, m-d-Y is not a MySQL date format, so the field is not a DATE type.wtf wrote:I have a date stored in a database in this format ("m-d-Y"). I want to print out the date in a table but only showing the month and day ex: ("m-d").will format date as you want it. It's already a part of your sql statement, therefore $row['date_assigned'] will come out in the format you want.Code: Select all
...DATE_FORMAT(date_assigned, '%m-%d') AS date_assigned...
Date Format
Moderator: General Moderators
- feyd
- Neighborhood Spidermoddy
- Posts: 31559
- Joined: Mon Mar 29, 2004 3:24 pm
- Location: Bothell, Washington, USA