Need Vb Script To Convert Lot Number To Expiration Date Follow
I need a custom vb script written
for use in a Bartender label.
A field on the label titled “Lot Number” will be a prompt at print time field. The user will enter the lot
number and it will consist of:
Example: U15C01 – which operator enters when asked by prompt
Starts with an Alpha Character (e.g. U – which represents
a manufacturing facility and is not used for any calculation.)
followed by a 2 digit number indicating year (e.g.
15 for 2015)
then a single alpha character ranging from A to L (e.g. C representing March) Letter represents month of the year with A=January,
B=February, C=March, D=April, E=May, F=June, G=July, H=August, I=September, J=October, K=November and L= December
then followed by two digits which represents the day of the month (01= 1st day of the month) and is not used for any type of calculation.
The script will use a value which equals the number of months till expiration (which can be stored within the visual
basic script or as embedded data in the expiration date field) and uses the two digit year and 1 letter month code from the lot number input and generates an expiration date printed on the next line of the label. Expiration date is expressed as YYYY.MM but the Month MM is a two digit number (i.e. 2016.09).
For example, a label is created for an item that has an 18 month expiration date. When the operator goes to print a label he is prompted (see prompt in below picture) to enter the lot number. He enters U15C01. That input then creates the expiration date which is used to print the next field on the label. The expiration date in this instance is 2016.09
The 15C from the input + the number of months (18) for expiration as stored as embedded data or
within the vb script calculates 2016.09
Please sign in to leave a comment.