Displaying TIMESTAMP Fields in an Editable Grid
1. For TIMESTAMP fields do not require display, you can simply not to include the column in the SQL SELECT statement.
For example:
e.g. timestamp_column is the TIMESTAMP field, do not include in the SELECT statement
$dg = new C_DataGrid('select id, col1, col2 from TABLE_NAME', 'id', 'TABLE_NAME');//
$dg->enable_edit('FORM');
$dg->display();or hide it by calling set_col_hidden().
$dg = new C_DataGrid('select id, col1, col2, timestamp_column from TABLE_NAME', 'id', 'TABLE_NAME');
$dg->set_col_hidden('timestamp_column', false);
$dg->enable_edit('FORM');
2. For TIMESTAMP fields require display. Here's a solution. Set the column to be read only, and must use INLINE edit mode.
$dg = new C_DataGrid('select id, col1, col2, timestamp_column from TABLE_NAME', 'id',
'TABLE_NAME');
$dg->set_col_readonly('timestamp_column');
$dg->enable_edit('INLINE');
$dg->display();
![](https://i.embed.ly/1/image?url=http%3A%2F%2Fphpgrid.com%2Fwp-content%2Fuploads%2F2014%2F02%2Ftimestamp-column-display-in-editable-grid-e1391643847121.png&key=16b1a988066d11e191834040d3dc5c07)