Please stop using screenshots for your code, makes it difficult for me to copy/paste/fix
You can just paste code into the forums, using the relevant formatting functions
$date1 = urlencode(date(‘Y-m-d\TH:i:sP’), time());
$date2 = urlencode(date(‘Y-m-d\TH:i:sP’, strtotime(‘-1 week’));