unable to to return part of date string using 'mdHi'

Links for php scripts

Moderators: macek, egami, gesf

Jason_C
New php-forum User
New php-forum User
Posts: 31
Joined: Sat Nov 18, 2006 7:32 am

unable to to return part of date string using 'mdHi'

Postby Jason_C » Fri Mar 21, 2014 7:34 am

I am trying to return only the numbers of a date string like so...

Code: Select all

$futureDate = date("mdHi", strtotime(date("Y-m-d H:i:s") + '+ 10 minute'));


But it is not returning the right date and time, it seems to be adding days as well and randomly.

I have set the server datetime to London Uk in my script and this does not correct things.

What is the correct way to get only the numbers of the date string that I am after.

Return to “PHP Scripts”

Who is online

Users browsing this forum: No registered users and 1 guest