I run into a little problem dealing with dates. I leave below a table in which you can see the date field I'm trying and some of the tests I've already done.
The field in question is the first to appear in the table and, as you can see, has a date in 'YYYYMMDD' format.
What I have to achieve is to keep only the year, eliminating the part corresponding to the month and day. In columns 2,3,4,5 you can see some tests I have done.
I know that I could get the same result simply by running a left, as shown below, but I would like to know the reason why I can not do it in the way mentioned above, using date() and above all understand the reason why this date appears so strange numeric.