d_barszczak Posted July 26, 2006 Share Posted July 26, 2006 I know this is such a simple problem as i have done it in the past and also seen it here but can't remember how i did it and cant seem to find it here.Basically i have a $datenow = date("U") and i would like to minus 5 minutes from this.Does anybody know how??? Quote Link to comment Share on other sites More sharing options...
redarrow Posted July 26, 2006 Share Posted July 26, 2006 <?$min=date("i")-5;$date_now=date("h:$min:s");echo $date_know;?> Quote Link to comment Share on other sites More sharing options...
d_barszczak Posted July 26, 2006 Author Share Posted July 26, 2006 ok,if date("i") is say 1 this wont give me -4 will it? Quote Link to comment Share on other sites More sharing options...
redarrow Posted July 26, 2006 Share Posted July 26, 2006 $h=date("h");$m=date("i")-5;$s=date("s");$date_now=date("$h: $m: $s");echo $date_now; Quote Link to comment Share on other sites More sharing options...
d_barszczak Posted July 26, 2006 Author Share Posted July 26, 2006 Hi,That method don't work but sorted it now anyway.[code]$min = date("U")-60*5;echo date("g:i:s A");echo "<br>";echo date("g:i:s A", $min)[/code] Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.