Danny620 Posted February 24, 2014 Share Posted February 24, 2014 Hi, I am developing a hotel booking type website, I need to be able to work out if its not 48 hours from the checkin date any ideas on how i do this my checkin date is in mysql format like 2014-02-15 so it needs to be able to check if its 48hours from that day 12pm Quote Link to comment https://forums.phpfreaks.com/topic/286484-subtract-48-hours-from-a-timestamp/ Share on other sites More sharing options...
gristoi Posted February 24, 2014 Share Posted February 24, 2014 DATE_SUB(checkin_date,INTERVAL 2 DAY) Quote Link to comment https://forums.phpfreaks.com/topic/286484-subtract-48-hours-from-a-timestamp/#findComment-1470431 Share on other sites More sharing options...
Danny620 Posted February 24, 2014 Author Share Posted February 24, 2014 I need to do it in php not as a query mysql Quote Link to comment https://forums.phpfreaks.com/topic/286484-subtract-48-hours-from-a-timestamp/#findComment-1470434 Share on other sites More sharing options...
Solution Danny620 Posted February 24, 2014 Author Solution Share Posted February 24, 2014 sorted it Quote Link to comment https://forums.phpfreaks.com/topic/286484-subtract-48-hours-from-a-timestamp/#findComment-1470435 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.