We help IT Professionals succeed at work.

DateTime question

PeterErhard
PeterErhard asked
on
280 Views
Last Modified: 2008-03-06
$MatchStartTime = $MatchDate . " " . $_POST["MatchStartTime"];

produces this:

'2007-01-01 10:30:00' ($MatchStartTime)

What I need to do is take $MatchStartTime and minus 5 hours off it. So in the above example it would be '2007-01-01 5:30:00' or if someone specifies '2007-01-01 22:30:00' the system would calculate it as '2007-01-01 17:30:00', etc, etc.

How could I do this? The field in the database is a DateTime field.
Comment
Watch Question

CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Author

Commented:
Thanks very  much
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.