Automatisation of sorting rows by date in colum C

Hello, Im trying to get the rows to sort by date in the column C when I enter a new entry.
I tried putting in macro and button for sorting by macro, but i didnt succeed, Please help.

That you have a sheet with some data doesn’t need to be explained by an image.
Please read the first post here, and attach an example file as .ods then if you need more specific help or advice.

Update to the now fresh LibO version 24.8.
It has the new array-function SORTBY() which should be able to do for you what you want without needing user code.
If you need to insist on using a more thoroughly debugged still version, tell so, please.