Welcome Guest, Not a member yet? Register   Sign In
DateTime Fields Problem
#1

(This post was last modified: 01-15-2021, 06:39 AM by thedragon655.)

hello i have a problem with ci4 and datetime fields. i am using the code below





Code:
  protected $useTimestamps = true;
  protected $createdField = 'com_created_at';
  protected $updatedField= 'com_updated_at';



the comment created at and comment updated at are inserted fine in the database but when i try to display them with humanize  format it gives me an error

Call to a member function humanize() on string

the code from my view

Code:
$c->com_created_at->humanize()

ps im using different names than created_at and updated_at because i need them to be like that.
Reply


Messages In This Thread
DateTime Fields Problem - by thedragon655 - 01-15-2021, 06:37 AM
RE: DateTime Fields Problem - by iRedds - 01-15-2021, 11:11 AM
RE: DateTime Fields Problem - by thedragon655 - 01-15-2021, 02:33 PM
RE: DateTime Fields Problem - by iRedds - 01-15-2021, 06:49 PM
RE: DateTime Fields Problem - by thedragon655 - 01-16-2021, 05:56 AM
RE: DateTime Fields Problem - by demyr - 01-15-2021, 02:29 PM
RE: DateTime Fields Problem - by thedragon655 - 01-16-2021, 06:39 AM



Theme © iAndrew 2016 - Forum software by © MyBB