So i have time 2012-09-19 10:42:48 How can i modify hour 10 to becomes 12 hours ? So +2 hours needed to be replaced
here is some sample code. the 7200 is 2 hours in seconds. $date = '2012-09-19 10:42:48'; echo date ('Y-m-d H:i:s',strtotime($date)+7200); PHP:
as stated above. use strtotime() or if you're making adjustments for timezones there are specific functions for both date offsets and timezone offsets. PHP has particularly good functions for dealing with dates, times and timestamps.