最佳答案
I used date('w', timestamp) and date('w', timestamp) to know the day, date('n', timestamp) for months, etc.
Now I'm using datetime and I'd like to know what are the equivalent functions to get a day, a month, etc from a datetime.
PS: I know I could use UNIX_TIMESTAMP() in a SQL query but I prefer avoiding timestamps using in my code.