php datetime sub minutes

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

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