They are sharing information with me which I have to add to a table, the problem is that the date is sent to me in this format 11012019 which would be 01/11/2019
I don't know if it is possible to carry out this process, but this is how I imagine it to be:
SELECT
CONVERT(DATETIME,'11012019',103) AS FECHA
FROM ORIGINA
Replace DATETIME with VARCHAR(255)
With DATETIME it would be like this:
And with DATE :
The problem is that you get the value of the date without any delimiter, and as far as I understand there is no way for that to be interpreted as a date, unless it has the following format
YYYYMMDD
which is also a standard format, the ISO 8601 .In your case, the most that occurs to me is to split that value and convert it into a standard format
YYYYMMDD
.I leave you an example using substring :
And here's another example using stuff :