Something like this?
CREATE TABLE #tmp( output nvarchar(max));
INSERT INTO #tmp
--Change Path
EXEC xp_cmdshell 'dir C:\Users\lcazares\Documents\Statement.pdf /TC'; --Uses /TC for creation date
SELECT CAST( LEFT( output, 10) AS datetime)
FROM #tmp
WHERE output LIKE '[0-9][0-9]/[0-9][0-9]/[0-9][0-9][0-9][0-9]%';
DROP TABLE #tmp;
Luis C.
General Disclaimer:
Are you seriously taking the advice and code from someone from the internet without testing it? Do you at least understand it? Or can it easily kill your server?
How to post data/code on a forum to get the best help: Option 1 / Option 2