Good, everyone again requesting your support as I have a question about Casting a date, which is stored in the DB as Varchar with the following format 20161105 0207 , I need to make a cast of this DateTime , the first 8 digits correspond to the date and the last four times per minute , so you can generate a query that shows records in a range of dates em> , I tried the options that I show in the lower part but they do not give me the result, if someone knows how to do it I will be infinitely grateful.
select CAST(cor_fecha_transaccion as datetime) from Corresponsalias
select CONVERT(datetime,cor_fecha_transaccion,20)from Corresponsalias