Split records in days

My goal is to output records to an excel sheet from dates between the 20th last month and the 20th this month.
The records are worked hours of a user.

My query to get the dates:

//get user
$user = $this->getUser();

//get hours between 20 last month and 20 this month
$hours = $this->getDoctrine()->getRepository(Hours::class)->findUserHours($user, $start20, $end20);

I get the records all at once i wondered if there is an if statement or special query to get the records day by day so i can split the records in seperate days.

Example:

enter image description here

Output of a record:

enter image description here

Source: Symfony Questions

Was this helpful?

0 / 0

Leave a Reply 0

Your email address will not be published. Required fields are marked *