7 risposte

That error, expecting text, received number, means that the formula return type is text and that the formula is returning a number. What exactly is the excel formula doing? Is there any other parts of the serial number that are important in this calculation? But I did create a formula that returns the date 2/25/2016. This is what I did:DATE(2010 + VALUE(MID("123456A60560001AB",8,1)),1,1) + VALUE(MID("123456A60560001AB",9,3)) - 1Substitute the sample serial number with the merge field and it will work. I'll break the formula down for you. "DATE(2010 + VALUE(MID("123456A60560001AB",8,1)),1,1)" takes the serial number and looks at the 8th character and uses that number plus 2010 to form the year. MID() returns text so I used VALUE() to turn it into a number. The syntax for the DATE() function looks like this DATE(year, month, day). Therefore it calculates January 1st of the year it was manufactured. "VALUE(MID("123456A60560001AB",9,3))" Takes the day of the year manufactured. In Salesforce, you can add and subtract numbers to dates, so the day of the year is added to January 1st. However, by adding to January 1st, an extra day is produced, so we subtract one day at the end.If this helps you or you have more information, please let me know or mark a best answer.Thanks,Parker