Avatar of Pedro Chagas
Pedro Chagas
Flag for Portugal

asked on 

PHP minus an hour

Hi E's,

I need help, to get minus one hour, of a specific date and time.

My date is in this format Y-m-d (2022-07-07) and hour H:i:s (00:36:45).

$today = "2022-07-07";
$hour = "00:36:46";

Open in new window

What I have to do to get -1 hour, like this:

2022-07-06 - 23:36:46?


The best regards,

JC

PHP

Avatar of undefined
Last Comment
David H.H.Lee

8/22/2022 - Mon