5 Replies Latest reply: Jun 6, 2018 9:29 AM by Giacinto Abbruzzese RSS

    convert numeric values into separate year fields(s)

    Giacinto Abbruzzese

      Hello,

       

      im looking for a script command that converts a product field (where the first digit of the value represents the production year info)

      into separate year-fields (dummywise):

       

      PRODUCT_NRConversion into2010201120132014
      3084804290010
      0460116401000
      1440951840100
      4136911610001
      4301541200001

       

      So the first digit of the product_nr 308480429 should be converted into a new field 2013

      046011640 into 2010,

      etc.


      OR

       

      a script command that generates a new year field based on the first digit of the product_nr:


       

      PRODUCT_NRYEAR
      3084804292013
      0460116402010
      1440951842011
      4136911612014
      4301541202014

       

      Maybe you can answer both questions?

      Anyways, thanks in advance!