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 Quote Link to comment 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')); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.