post by markab on Nov 21, 2021

The following code will only write 00/00/0000 00:00:00 back to the datetime field in the database. calling date works in callbackEditForm so why not callbackBeforeUpdate???

	$crud->callbackBeforeUpdate(function ($stateParameters) {
		
		
		$test = date('d/m/Y H:i:s');
		
	    $stateParameters->data['record_cmr_checked_date'] = $test;

		return $stateParameters;
	});

post by johnny on Nov 22, 2021

Hello @markab ,

When you are adding the value into the database you should use the form: Y-m-d H:i:s

So try this instead:

$test = date('Y-m-d H:i:s');

post by markab on Nov 22, 2021

1 / 3
Nov 2021