3 Replies Latest reply: May 9, 2016 1:21 AM by Feras Alsuhaibani RSS

    How to Use Mid with Min Function

    Feras Alsuhaibani

      Hello Everyone!

       

      So I have this field which contains a code and within that code there is a year (e.g. XXYYYYZZZZZ, where YYYY represents the year).

      So what I would like to do is to get the minimum year after extracting it from that field. I have tried the following:

       

      Min(Mid(Code, 3, 4))

       

      Min(aggr(Mid(Code, 3, 4), ID))


      But it doesn't work.


      Your help is appreciated.