Mr Clevver
Idiot Savant
- Local time
- Today, 10:12
- Joined
- Jun 26, 2008
- Messages
- 17
Hi all.
I'm looking for some help automating the process of converting ISBN10s* to ISBN13s in a book database that I'm currently working on. ISBN13s are pretty much the same as an ISBN10, but are prefaced with 978 and, here's the rub, the last digit is a check digit that is dynamically calculted from the previous 12, using the formula:
[10-([9+(3*7)+8+X1+3X2+X3+3X4+X5+3X6+X7+3X8+X9+3X10+X11+3X12]Mod10)]Mod10
Where X1 is the first digit of the 10 digit ISBN, X2 is the second etc.
All that is academic really, as I'm struggling with the very first stage, which is splitting the ISBN10 into individual digits, so I can assign them to the variables X1, X2 etc.
I've tried using the Split() function, but am struggling with this as the data doesn't have any delimiters. I thought maybe arrays would be the way to go, but am struggling to find a decent overview of their workings.
Any help would be much appreciated.
*ISBN10 and 13 are unique identifiers given to books. ISBN13s are the new standard, with the ISBN10s slowly being faded out.
I'm looking for some help automating the process of converting ISBN10s* to ISBN13s in a book database that I'm currently working on. ISBN13s are pretty much the same as an ISBN10, but are prefaced with 978 and, here's the rub, the last digit is a check digit that is dynamically calculted from the previous 12, using the formula:
[10-([9+(3*7)+8+X1+3X2+X3+3X4+X5+3X6+X7+3X8+X9+3X10+X11+3X12]Mod10)]Mod10
Where X1 is the first digit of the 10 digit ISBN, X2 is the second etc.
All that is academic really, as I'm struggling with the very first stage, which is splitting the ISBN10 into individual digits, so I can assign them to the variables X1, X2 etc.
I've tried using the Split() function, but am struggling with this as the data doesn't have any delimiters. I thought maybe arrays would be the way to go, but am struggling to find a decent overview of their workings.
Any help would be much appreciated.
*ISBN10 and 13 are unique identifiers given to books. ISBN13s are the new standard, with the ISBN10s slowly being faded out.