Reputation: 9
I’m having problems when I try to insert a function of Select detro example DATE_FORMAT (date_end, ‘% W% M% Y’) AS dateend.
$ this-> db-> select (name, DATE_FORMAT (date_end, ‘% W% M% Y’) AS dateend)
It says the ‘% W% M% Y’ method is unknown
Upvotes: 0
Views: 1185
Reputation: 5351
According to this post and this forum entry, adding false
to your query will do the job:
$this->db->select("DATE_FORMAT(your_date_field, 'Year: %Y Month: %m Day: %d') AS formated_date", FALSE );
Upvotes: 3