I am trying to get data from some particular range of dates,
<?php
function index_finder()
{
$strStart = '2021-01-02';
$strEnd = '2021-08-28';
$dteStart = new DateTime($strStart);
$dteEnd = new DateTime($strEnd);
$dteDiff = $dteStart->diff($dteEnd);
$date = $dteDiff->format("%m month\n");
if ($date > 6)
{
$curl = 'https://localhost:9200/studio-.'$strStart'.,studio-.'$strEnd'./_search?pretty';
print $curl;
}
}
if date range is more then 6 months, then need to call this curl with start and end date, I am trying to insert the startdate and end date in the url.
Kindly help me out to pass the dates in the url.
Thanks in advance