Can you point to the docs for that function? I cannot seem to find it anywhere. I can only find datediff()
Sep 14, 2022
15
Level 5
Undefined function: 7 ERROR: function timediff posgresql laravel
Hi , after i finished my app and every thing is okay now i deploy it on heroku but when i login with employee i got
SQLSTATE[42883]: Undefined function: 7 ERROR: function timediff(character varying, character varying) does not exist
LINE 1: select sum(time_to_sec(timediff(checkin, checkout))) as aggr...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts. (SQL: select sum(time_to_sec(timediff(checkin, checkout))) as aggregate from "employee_attendances" where "employee_attendances"."employee_id" = 1 and "employee_attendances"."employee_id" is not null and extract(day from "created_at") = 14 and "checkout" is not null)
the database is posgresql and i think the problem is here
return CarbonInterval::seconds($this->attendances_working_hours->sum(DB::raw("time_to_sec(timediff(checkin, checkout))")))->cascade()->forHumans();
any help ?
Please or to participate in this conversation.