Deepak Ranjan Jena
Deepak Ranjan Jena

Reputation: 437

php date function

I am using date function to find current time as date('Y-m-d H:i:s');

I want to find 15 mint from now using PHP using date function

Please help me.

Upvotes: 1

Views: 842

Answers (2)

d11wtq
d11wtq

Reputation: 35318

strtotime() is your friend here. It will parse all kinds of input and give you a time using plain English.

echo date('Y-m-d H:i:s', strtotime('+15 minutes'))

Upvotes: 2

bcosca
bcosca

Reputation: 17555

date('Y-m-d H:i:s',strtotime('+15 minutes'))

Upvotes: 3

Related Questions