Reputation: 16268
I need to create a date to be stored in mysql
. The date is 5 days from now. I thought maybe CakeTime::dayAsSql('+5 days')
but I'm missing a parameter which the documentation doesn't describes and also I dont really know if this will give me what I need. Any ideas?
Upvotes: 0
Views: 195
Reputation: 25698
Have you read the documentation at all? I'm asking because CakeTime::dayAsSql()
is clearly not what you want:
Returns a partial SQL string to search for all records between two times occurring on the same day.
Use CakeTime::format()
:
echo CakeTime::format('+5 days', '%B %e, %Y %H:%M %p');
Upvotes: 2