If you are going to mush the date with the sequence number, you MUST put the fixed part of the string on the left so it must be yymm00000 or mmyy000000 so you can always strip off the first four characters to isolate the sequence number on which you need to do arithmetic. Since you want to reset on the year, I would start with year rather than month.