$created_at = new \Square\Models\TimeRange();
$created_at->setStartAt(’’$today_startdatetime’’); //not working
$created_at->setEndAt(‘2021-04-16T23:59:59+08:00’); //this works
$date_time_filter = new \Square\Models\SearchOrdersDateTimeFilter();
$date_time_filter->setCreatedAt($created_at);
So the above is my code where I replaced XXX inside the setStartAt(XXX) from String to a variable and it would not work. Is there any solution I could be able to place a variable inside the setStartAt()?
When I copy paste the output above into the setStartAt(‘OUTPUT’), it did not work. However, when I manually retype the same exact thing it works. I am a little confused now, is the output different from what I manually typed → 2021-04-16T00:00:00+08:00?