Closed paulgotea closed 3 months ago
Hi @paulgotea
To be able to get data by date range, I recommend using the QueryBuilder
class.
$query = $service->initializeQueryBuilder();
$result = $query->select("created_at")
->from('usersData')
->where('created_at', 'gte.' . $this->start_date . 'T00:00:00')
->where('created_at', 'lt.' . $this->end_date. 'T23:59:59')
->execute()
->getResult();
I hope you can resolve this.
If you have any problems, I am available to try to help you.
=)
I am trying to make a query and get the data based on created_at field for a specific date interval.
How can I add to conditions for one field?
Currently I have this;
But I want to add this as well:
'created_at' => 'lt.' . $this->end_date . 'T23:59:59',
Thanks!