9 Replies Latest reply: May 15, 2014 10:04 AM by Olly Bond RSS

    Month query

    KarenG _



      I am trying to split out the month out of a date , for instance


      01/05/09 - instead of returning "5".. i want to be able to return "MAY"...


      how can i do this?



        • Month query
          fino _



          Create a calculated character field called Month


          • Month query
            Grant Perkins

            Hi Karen,


            There are a couple of ways to approach this  - the choice is yours ...!


            You could create a Lookup Table that lists the month number in one column and the name in the next.


            To get the Month Name into you data table then becomes a simple lookup based on identifying the month number with Month(yourdate).


            If you have noy user INTERNAL LOOKUPs before read through the Help section which provides a comprehensive reference to the whole subject. It's not difficult but does have a few options for different requirements (more complex than your is here) so reading it is a good idea.


            The alternative is to use a calculated field and a formula, also based on the Month() function.


            If(Month(yourdate)=1, "Jan","")+







            and so on for the 12 months.


            There are other ways but these are the most logical approaches since the Month() function is kindly provided.


            If you now have V9 or V10 you could make the Lookup approach an Object that can be imported or shared (either) for all lyou models that reuire the 'translation' and so the Lookup Table or formula only need be created once.


            You can re-use the originals in earlier versions of Monarch of course by copying from one model to another - but not quite so easily!






            • Month query
              KarenG _

              just to let you know - went with the lookup table.. easiest way around it... thanks guys