How To Subtract Seconds To Current Date Time In Codeigniter?

Codeigniter

Nicesnippets

711

29-12-2020


Hi Guys,

In this example,I will learn you subtract seconds to current date time in codeigniter.you can easy and simply subtract seconds to current date time in codeigniter.

we will show subtract seconds in current date time codeigniter.this tutorial will give you example of subtract seconds to current date time using codeigniter.

Example:


public function index(){

//Remove to seconds in current date time

$date = date('Y-m-d H:i:s', strtotime('-15 seconds'));

}

Output:

2020-12-29 10:18:26

It will help you...