I think you've misunderstood the example I posted. The code in the 1st example:
$x=gci C:\junk\evt.xml
($x.lastwritetime).gettype()
Was intended to show you that the LastWriteTime isn't a string object, but a DateTime object and that trying to use a string when attempting to compare the value of a DateTime object is incorrect.
Your script should look something like this:
Get-ChildItem -Path \\awsdisk\PDF\ExecutionLogs -Recurse -File |
Where-Object {($_.LastWriteTime -gt [DateTime]'2020-09-06 00:00:00') -and ($_.LastWriteTime -lt [DateTime]'2020-09-21 00:00:00')} |
Select-String -Pattern 'Error happened during downloading test components: due to:' -CaseSensitive -SimpleMatch |
Out-File c:\ritaaws\result01.txt