Thanks, but it is not what i was expecting. I
I am getting close but i still have a problem
let's say

$reminder ="300"; // 5 minutes * 60 seconds (to convert to seconds) 
$timefromreminder = date('h:i:s', strtotime("-$reminder seconds")); 
// this will give 5 minutes minus the current time 
//but what i am looking for is to be able to do this 
$event_start_time = '11:45:00';
 $timefromreminder2 = date('$event_start_time', strtotime("-$reminder seconds")); 
//Now it does not give 11:40:00 instead it does nothing and gives the same 11:45:00

I want to be able to delete 5 minutes from a time i specify

This code will generate your requires output.

<?	
	$reminder ="300"; // 5 minutes * 60 seconds (to convert to seconds) 
	$timefromreminder = date('h:i:s', strtotime("-$reminder seconds")); 
	// this will give 5 minutes minus the current time 
	//but what i am looking for is to be able to do this 
	
	$event_start_time = '11:45:00';
	echo '<br />Start Time : '.date('H:i:s',strtotime($event_start_time)); 
	echo '<br />End Time : '.date('H:i:s', strtotime("-$reminder seconds",strtotime($event_start_time))); 
	exit;	

?>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.