Converting a date into a time

i have a date and time calculated together but i want to convert the date and into a time format or removing the folowing code or string tags i guess you could call it -:;, but how can i remove it from these dates ive tried so many ways cant remove it cuz i am wanting to check the time between 2 dates and then divide that by 15 minutes or in this case times by 15 minutes.

Thanks,William

Here is what i am actually wanting i have this person called star and he has logged last logged in on the 2009-12-18,09:02:15 the time check he logged was ment to login was is2009-12-18,09:12:15 now i want to calculate how many 15 minutes have passed since then this is my php code for calculating it so far.


$my_time = strtotime($ld); 
			$seconds = time() - $my_time;  
			$minutes = (int)($seconds / 60); 
			$hours = (int)($minutes / 60); 
			$m=(int)($minutes/15);
			echo  "".$u."".$minutes."<br/>".$hours." so every 15 minutes&nbsp;".$u."&nbsp;will get&nbsp;".$m."<br/><br/>";

is that correct how am i doing it as $minutes divide that by 15 that is i am hoping to be 15 minutes is that correct to what 15 minutes would be or would that be 900 for what i am wanting to be 15 minutes in 900 seconds?

Thanks,William

It sounds like what you want to do is divide by 900. You can test it to make sure it gives the desired result. For example, create some fake datetime strings


$start = '2009-12-18 09:12:15';
$end = '2009-12-18 09:32:15';

And then use those to test your code.

okay ill test it and see what the output is and ill post back with results.