I want to genarate unique code for a user which is of 8 digits and first 2 digits should be the last 2 digits of a year. for example if year is 2016 then code should be 16000001. please help me.

What do you have so far? What language are you using?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.