I’m having a problem with the Middle Function. I might not have used the right
function to extract numbers from the middle of a string of integers.
I scanned a QR code from a breast implant box.
Numbers Scanned From a QR Code are
The breakdown is as follows
0110888628007284 17 210824 21 21592096
18 integers ? date(08/24/2021) ? Serial Number
The first 18 integers are numbers that come before the date. The date is
08/24/2021. It is the expiration date for a breast implant still in a box.
The last 8 digits are the serial number on the box.
The 17 and the 21 seem to be numbers common to all the QR codes on the boxes.
(I’m calling them
I tried extracting the date from the QR code by using
the Middle function and structure it as a date Month/day/Year i.e. 08/24/2021. My original calculation was
Expiration_Date = Middle(QRScan;21,2) & “/“ & Middle(QRScan;23,2) & “/“ & “20” & Middle(QRScan; 19,2)
However this resulted in “21/08/2017”
When I looked at the code number, it appears that, using the middle function, off sets the
results by 2 characters to the left. i.e. 17 is called.
The correct calculation is
Middle(QRScan;23;2) & "/" & Middle(QRScan;25;2) & "/" & "20" & Middle(QRScan; 21;2 )
It returns 08/24/2021
Did I use the wrong function? Why would it offset the results using 2 characters to the left?
Should I have used the Right Function?
Thank, Dr. B