MySQL date_format - Useful Date Formats

I'm always having a difficult time remembering the date_format strings I need, so I put together this little list. Maybe you'll find the list useful as well...

Field Name

Format Function Example Output/Notes
2007-12-01
07-12-01
Day of the week (0=Sunday, 1=Monday, ..., 6=Saturday). Weekday filter: NOT IN (0, 6)

Navigation



Recent Biking Stats
Days Miles MPH
Last 7 45 14.8
Last 14 120 14.7
Last 30 194 14.6