Board index   FAQ   Search  
Register  Login
Board index PHP PHP Scripts

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

Links for php scripts

Moderators: macek, egami, gesf

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.
Jason_C
New php-forum User
New php-forum User
 
Posts: 29
Joined: Sat Nov 18, 2006 7:32 am

Return to PHP Scripts

Who is online

Users browsing this forum: No registered users and 1 guest

Sponsored by Sitebuilder Web hosting and Traduzioni Italiano Rumeno and antispam for cPanel.

cron