I'm working with dates in a db that store in a YYYY-MM-DD HH:MM:SS format. What is the easiest way to do the following?
1) Determining what day of the week that is (Mon, Tue...)
2) Adding one day to it (where it calculates a new month, year, leap year...)
3) Adding one hour to it
4) Calculating the difference between dates
Thanks
date question
Moderator: General Moderators
- aaronhall
- DevNet Resident
- Posts: 1040
- Joined: Tue Aug 13, 2002 5:10 pm
- Location: Back in Phoenix, missing the microbrews
- Contact:
You could explore MySQL's temporal functions, or use strtotime() from PHP