RE: [PHP] subtracting time from date and time

2007-06-18 Thread Richard Kurth
Subject: Re: [PHP] subtracting time from date and time > > Richard Kurth wrote: > > > > > >> -Original Message- > >> From: Chris Boget [mailto:[EMAIL PROTECTED] > >> Sent: Monday, June 18, 2007 10:55 AM > >> To: Brad Bonkoski;

Re: [PHP] subtracting time from date and time

2007-06-18 Thread Jim Lucas
Richard Kurth wrote: -Original Message- From: Chris Boget [mailto:[EMAIL PROTECTED] Sent: Monday, June 18, 2007 10:55 AM To: Brad Bonkoski; Richard Kurth Cc: php-general@lists.php.net Subject: Re: [PHP] subtracting time from date and time Something like this will get it into a time

RE: [PHP] subtracting time from date and time

2007-06-18 Thread Chris Boget
> This works great tell you get to 8 hours ago > it shows the correct time but it does not change > the date to the day before. 8 hours ago should be > 06/16/2007 11:35:00 but what it shows is 06/17/2007 > 11:35:00 Your code works for me. Though, I had to change the format of $str slightly to

RE: [PHP] subtracting time from date and time

2007-06-18 Thread Richard Kurth
> -Original Message- > From: Chris Boget [mailto:[EMAIL PROTECTED] > Sent: Monday, June 18, 2007 10:55 AM > To: Brad Bonkoski; Richard Kurth > Cc: php-general@lists.php.net > Subject: Re: [PHP] subtracting time from date and time > > > Something like this wi

Re: [PHP] subtracting time from date and time

2007-06-18 Thread Chris Boget
Something like this will get it into a time stamp...and then you can do your calculations with ease, and reformat... Even easier: $timestamp = strtotime( $str ); http://us2.php.net/manual/en/function.strtotime.php $oneMinute = 60; // seconds $oneHour= $oneMinute * 60; $oneDay = $oneH

Re: [PHP] subtracting time from date and time

2007-06-18 Thread Brad Bonkoski
Something like this will get it into a time stamp...and then you can do your calculations with ease, and reformat... -Brad Richard Kurth wrote: I am trying to figure out what is the most accurate way to find the time after I subtract 5 min,15 min, 30 min 1 hour 2 hours and 5 hours from a date

[PHP] subtracting time from date and time

2007-06-18 Thread Richard Kurth
I am trying to figure out what is the most accurate way to find the time after I subtract 5 min,15 min, 30 min 1 hour 2 hours and 5 hours from a date and time that is formatted like this 20070617T193500 this is the way it has to be formatted to work in a vcalendar