like this?
-- create some consumable data...
CREATE TABLE test(
txtdatetime varchar(50)
);
GO
INSERT INTO test(txtdatetime) values ('12-18-2019 T 09:00 AM')
,('12-18-2019')
,('12-15-2019');
SELECT txtDateTime As origvalue
, CAST(REPLACE(txtDateTime,' T','') AS DateTime) AS testreturn
FROM test;