dsp77 Posted November 17, 2009 Share Posted November 17, 2009 I have a dilemma i have a input text field where the user inserts an hour and minutes like 12:00 and i want to save it in the data base like 11:59 and then display the correct hour like 12:00 Link to comment https://forums.phpfreaks.com/topic/181867-substract-1-minute-from-user-input-minutes/ Share on other sites More sharing options...
cags Posted November 17, 2009 Share Posted November 17, 2009 Something like this should allow you to minus one minute from an inputted time. $var = '12:00'; echo date("H:i", strtotime($var . ' -1 minutes')); Link to comment https://forums.phpfreaks.com/topic/181867-substract-1-minute-from-user-input-minutes/#findComment-959149 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.