I use the (server-side processing) pipelining data feature from DataTables to reduce Ajax calls for paging.
$columns = array(
array( 'db' => 'order_number', 'dt' => 0 ),
array( 'db' => 'customer', 'dt' => 1 ),
array( 'db' => 'commission', 'dt' => 2 ),
array(
'db' => 'timestamp_created',
'dt' => '3',
'formatter' => ???
)
);
My question is how can i configure the formatter? For example i have a timestamp so i want to format this timestamp from my database into a more user-friendly-format. This isn´t a problem, but i can not write a normal php function - which would do this for me. If i do it, i get an error. So can anyone help me out and is able to give me a example in how to use this formatter?
Edited:
The answer is not that i didn´t get it by myself in a correct way, the answer is my php version was too old and so the formatter didn´t worked as it should be working. You need at least PHP version 5.3!
Maybe this will help somebody in the future.