Year formular doesn't work correctly

I have a column of dates (delivery dates) with format dd-mmm-yyyyy.

As I need to group by years in a pivot table I need to create a column only with year using the formula YEAR(cell).
(Formatting the column “delivery dates” does not created a grouping by years in the pivot table.)

When I use the wizard for this very function the result is correct in the wizard window. but when i click OK in the wizard, the date appearing as the result in a cell shows always 1905.

My date setting in Tools/Options/LibreOffice Calc/Calculate is 12/30/1899(default)
LibO version:

Any help is appreciated

Check if column Delivery date is in appropriate format (date). I inserted few rows with format dd-mmm-yyyyy in date column, formula YEAR(cell) is correct in next column and in pivot table to.

Thanks for your comment. Delivery date column format is dd-mmm-yyyy. Thus I considered the column correct formatted. I also checked if all are date values and changed the date format to 2 - 3 other formats and result was correct… and this became my headaches.

Hi ROSt52,

It is easy to do in PT, once you have made the PT, go to the column with date inside PT, and use Menu/Data/Group & Outline/Group or [F12], there you can select how to group dates.

THANKS this was a great hint. It works just as you described… I should have posted my question earlier…