I have a lot code (plant,date,line,sub) that I need to convert to a date. The lot code is always a 10 digit number.
6051230220… The date is located in the 3rd – 7th digit, represented as YMMDD. So in this case it is 51230 or December 30, 2015. I am ultimately trying to get the expiration date which will be random but for this argument it will be 60 days. I am using a user form (UserForm1). The user enters the lot code into (LotTextBox1). I have an expiration date box on the user form (ExpDateTextBox1). I decided to use the worksheet in the workbook (User Form) to get the date value separated using the mid function. I figured I could have the user enter the lot code in the User Form worksheet and manually type it in the (ExpDateTextBox1) on the userform (UserForm1). But I can’t get the format to be recognized as a date to add the days to get the expiration date. Any ideas?
If there is a way to calculate it right on the userform and not use the mid function that would be great too but I will take either way.
Bookmarks