Hello ,
I would suggest you to cast the
@P_TS
value as date format like this way
SELECT * FROM PRIORITY WHERE
FORMAT(P_TS, 'yyyy-MM-dd') like '%' + @SearchVal + '%'
Or you may used Convert function as well
SELECT * FROM PRIORITY WHERE
convert(varchar, P_TS, 126) like '%' + @SearchVal + '%'
Here I am assuming you are passing @SearchVal in 'yyyy-MM-dd' format.
Hope it may helps you.
Thanks