php datetime sub minutes

Solutions on MaxInterview for php datetime sub minutes by the best coders in the world

we are a community of more than 2 million smartest coders
registration for
employee referral programs
are now open
get referred to google, amazon, flipkart and more
register now
  
pinned-register now
showing results for - "php datetime sub minutes"
Marco
15 Mar 2016
1$datetime = new DateTime();
2
3//PT 'TIME' M
4//PT30S -> 30 Seconds
5//PT30M -> 30 Minutes
6//PT30H -> 30 Hours
7$datetime->sub(new DateInterval('PT12H30M'));
8