How do I recreate this custom order number system compatible with both Calc and Excel?

Of course:
B ← order date.