How To Add Hours To Current Date In Codeigniter?

Codeigniter

Nicesnippets

507

23-12-2020


Hi Guys,

In this example,I will learn you add hours to current date in codeigniter.you can easy and simply add hours to current date in codeigniter.

we will show add hours in current date codeigniter.this tutorial will give you example of add hours to current date using codeigniter.

Example:


public function index()

{

//Add Hours current time

$date = date('d-m-Y H:i:s', strtotime("+1 hour"));

}

Output:

23-12-2020 11:32:25

It will help you..