Reset Counter Daily??

Reset Counter Daily??

We want to assign each entry a date code with index. So each submission would look something like YYMMDD-[Index] I can get the YYMMDD-[Index] and i have the function working to increment the index after each submission but what i can figure out is how to get [index] to reset every day so each day it starts at 1.