8 Replies Latest reply: Apr 18, 2018 1:58 AM by Dhaval Vyas RSS

    Monthname from Fiscal Calendar

    Dhaval Vyas

      Hi,

      Following is my Calendar from which I want Month Name.How to Retrive Month Name from It.

       

      left join (April)

      LOAD * INLINE [

      MONTH_NUM,Month

      4, Apr

      5, May

      6, Jun

      7, Jul

      8, Aug

      9, Sep

      10, Oct

      11, Nov

      12, Dec

      1, Jan

      2, Feb

      3, Mar

      ];

       

       

      GDP_1:

      load *,

      MakeDate(Year,MONTH_NUM,1) as GDPDT

      //'Q' & Ceil(NUM(MONTH_NUM)) AS GDPQuarter,

      //'Q' & ceil(month(MakeDate(Year, MONTH_NUM,1))/3) as [GDPDT Quarter]

      Resident April;

      drop table April;

       

      GDP_Final:

      Load *,

      //Year(GDPDT) AS [GDP Year],

      right(yearname(GDPDT,0,4),4) as [GDP FYear],

      //Month(GDPDT) AS [GDP Month],

      if(num(month(GDPDT))<=3,(num(month(GDPDT))+9),(num(month(GDPDT))-3)) AS [GDP MonthNum],

      Day(GDPDT) AS [GDP Day],

      'Q' & Ceil(NUM(if(num(month(GDPDT))<=3,(num(month(GDPDT))+9),(num(month(GDPDT))-3)))/3) AS [GDPDT Quarter]

       

       

      RESIDENT GDP_1;

      DROP TABLE GDP_1;