LO Base, how to create/restart incremental numbering?

We have an ordering system that uses the current date as a reference/serial number. The numbering somehow goes like this: YYMMDD-CC, the YYMMDD is the date while the CC starts with 1 on the start of the day and increments, and restarts the numbering again on the next day.
image description


any help will be grateful, thanks!

Hello,

Not a very convincing requirement - ...numbering somehow goes like...

Is that the requirement or not?

What DB is being used? LO version? Is this a Primary Key?