Datatable returns NULL datetime values as 1969-12-31
Datatable returns NULL datetime values as 1969-12-31
webpointz
Posts: 126Questions: 30Answers: 4
in DataTables
Hoping someone can help me.
I have a page with an editor table at the top, and a datatable on the bottom.
Both show the same fields, including a date field.
In the datatable field, it is displaying NULL values from the database as 1969-12-31.
Does anyone know how I can handle the NULL values to display as nothing with the following server processing code:
array( 'db' => 'expirydate',
'dt' => 3,
'formatter' => function( $d, $row ) {
return date( 'Y-m-d', strtotime($d));
}
This question has an accepted answers - jump to answer
This discussion has been closed.
Answers
Found a solution that appears to work. Here is the code I'm using: