Jump to content

Archived

This topic is now archived and is closed to further replies.

Andrew R

Subtracting time

Recommended Posts

Hi

How would I subtract 1 hour from this time function [code]$time = date('H:i');[/code]

Cheers  :)

Share this post


Link to post
Share on other sites
[code]<?php

$time = date("H:i", time()-60*60);

?>[/code]

Check the [url=http://www.php.net/manual/en/function.date.php]date()[/url] function for further info :)

Orio.

Share this post


Link to post
Share on other sites

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.