This question probably belongs in a sql server forum. You can have a look at the example below, but note that if you need some kind of timezone conversion, then the below query won't work
WITH temp AS (
SELECT 'Tue, 22 Aug 2017 03:06:47 GMT' as dt
)
,temp2 AS
(
SELECT dt, RTRIM(LTRIM(REPLACE(SUBSTRING(dt, charindex(',', dt) + 1, 100), 'GMT',''))) AS TrimmedDate
FROM temp
)
SELECT dt, TrimmedDate, CONVERT(DATETIME2, trimmeddate, 13) as FinalDate
FROM temp2