mardi 3 mai 2016

DATE_FORMAT() failing in SQLITE

I have a method which calculates the number of user signups

public function getNumberofUserSignupCount()
{
   $users = DB::select('select count(id) as count,   
            DATE_FORMAT(created_at, "%M %y") as months
            from users group by months order by created_at');
   return $users;

} I am using SQLITE database and I get an error as

SQLSTATE[HY000]: General error: 1 no such function: DATE_FORMAT (SQL: select count(id) as count,

Is there any other way to get the DATE_FORMAT in SQLITE

Aucun commentaire:

Enregistrer un commentaire