2 Replies Latest reply on Feb 28, 2011 1:20 AM by AlexPalmer

# Extracting part of a serial number to use in a calculation

### Title

Extracting part of a serial number to use in a calculation

### Post

Hi, I have a field with a serial number;

101160342A

The first 2 digits are the year 10=2010

The next 3 digits are the day number for that year 116th day.

I would like to create a field "manufactured on" that gets the those 5 digits and auto fills them into a normal date (day/month/year).

I'm fairly new to FM. I know I need a date calculation to display the date in day/month/year, but I have no idea how to extract the 5 digits and arrange them for the calculation.

Any advice would be greatly appreciated.

Many thanks

• ###### 1. Re: Extracting part of a serial number to use in a calculation

If there are ALWAYS 2 digits for the year and 3 digits for the daynumber:

Date ( 1 ; 0 ; 2000  + Left ( serial ; 2 )  ) + Middle ( serial ; 3 ; 3 )

The date of the given serial number is: 26/04/2010

• ###### 2. Re: Extracting part of a serial number to use in a calculation

Perfect. Many thanks.