How can i substract 1 hour to the date using this format: Date("Y-m-d G:i:s")http://www.htmlforums.com/showthread.php?s=&threadid=37627
Almost the same question.Thanks, I noticed that I didn't read the bottom and I found what I needed.I got another problem :crying:
I try to verify if a date if < than another but with those values : 2004-04-08 10:31:57 < 2004-04-08 9:31:57, it say that 9:31:57 is higher than 10:31:57.
is there a good way to verify if the hour is smaller than another?Forget it, I was using G and not H
sorry you lost 10 sec of your life to read thatno worries - sometimes you need to write down the problem to get your brain thinking straight
I've posted here before and then answered myself after a few minutes.for math like that and since you have the seconds in there you should be using timestamps instead. a lot eaiser.Timestamps are unix timestamps. Check here for more info:
<!-- m --><a class="postlink" href="http://us2.php.net/manual/en/function.mktime.php">http://us2.php.net/manual/en/function.mktime.php</a><!-- m -->
Almost the same question.Thanks, I noticed that I didn't read the bottom and I found what I needed.I got another problem :crying:
I try to verify if a date if < than another but with those values : 2004-04-08 10:31:57 < 2004-04-08 9:31:57, it say that 9:31:57 is higher than 10:31:57.
is there a good way to verify if the hour is smaller than another?Forget it, I was using G and not H
sorry you lost 10 sec of your life to read thatno worries - sometimes you need to write down the problem to get your brain thinking straight
I've posted here before and then answered myself after a few minutes.for math like that and since you have the seconds in there you should be using timestamps instead. a lot eaiser.Timestamps are unix timestamps. Check here for more info:
<!-- m --><a class="postlink" href="http://us2.php.net/manual/en/function.mktime.php">http://us2.php.net/manual/en/function.mktime.php</a><!-- m -->