'how to get date format only Hours, Minutes, and second
output from 'in.attendance_time as in_time', 'out.attendance_time as out_time',
$absen = DB::table('attendance as in')
->where('in.in_out', 'in')
->where('in.company_id', \Session::get('selected_company'))
->whereDate('in.created', Carbon::today())
->leftJoin('attendance as out', function ($join) {
$join->on('in.employee_id', 'out.employee_id')
->where('out.in_out', 'out')
->where('out.company_id', \Session::get('selected_company'))
->whereDate('out.created', Carbon::today());
})
->join('employee', 'employee.id', 'in.employee_id')
->join('location_library', 'location_library.id', 'in.attendance_location_id')
->join('company as cp', 'cp.id', 'in.company_id')
->join('employee_in_app as e_app', 'e_app.employee_id', 'in.employee_id')
->join('employee_in_company', 'in.employee_id', 'employee_in_company.employee_id')
->select('employee.name', 'cp.alias', 'in.employee_id','location_library.location_name', 'in.attendance_time as in_time', 'out.attendance_time as out_time', 'e_app.note')
->orderBy('in.attendance_time', 'DESC')
->get();
I want to retrieve only hours, minutes and seconds without the date, month and year in the select, how to solve this problem? data showing date is 'in.attendance_time as in_time', 'out.attendance_time as out_time',
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
