I need to be able to Generate a 25 character product key based on a date and a string

I need to beable to extract the date {the date tells me if the serial has expired} but the string is just the app ID

I want the product code to only use CAPS A-Z and numbers 0-9 (like m$ so its simple for customers )

anyone got any thinks or examples to get me started - im not looking for a free ride, i want to actually learn how to do this for some other appz.