Jump to content


To change the integer time to a timestamp when state=Read

GroceryCRUD Read type fieldtype fieldvalue datatype

  • Please log in to reply
No replies to this topic

#1 Rajeshwar

Rajeshwar

    Newbie

  • Members
  • Pip
  • 1 posts

Posted 21 January 2016 - 10:29 AM

While using Grocery CRUD,

I have a database field "created"(dataType=>integer).

 

When state=list the following code converts the integer to date format and display,

 

$crud->callback_column('created', array($this,'date_display')); //where date_display a function to change date format works

 

 

function date_display($value, $row){
   return  date('d M Y H:i:s',$value);
}

 

 

 

Whereas when state="read" the above code does not work and neither the function "change_field_type" works.

 

$crud->change_field_type('created', 'datetime');

 

How to change the integer time to date format in case of state='read'?







0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users