Link to home
Start Free TrialLog in
Avatar of PeterErhard
PeterErhard

asked on

DateTime question

$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.
ASKER CERTIFIED SOLUTION
Avatar of Ivo Stoykov
Ivo Stoykov
Flag of Bulgaria image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of PeterErhard
PeterErhard

ASKER

Thanks very  much