12 Replies Latest reply: Jul 8, 2016 5:49 AM by Supriya R RSS

    Getting min and max date of Date_Runrate

    Supriya R

      I am using below code to get Date_Runrate

       

      LET vCalendarStart = Date#('01/01/2014'); 

      LET vCalendarEnd = YearEnd(today()+5);

      LET vCalendarLength = $(#vCalendarEnd) - $(#vCalendarStart) + 1;

      Calendar1:

          LOAD

        Date($(#vCalendarStart) + RecNo()-1) AS "Date_Runrate"

      AutoGenerate $(#vCalendarLength);

        

        Calendar2:

          LOAD

        Date_Runrate,

        Year(Date_Runrate) AS Year_Runrate,

        Num(Month(Date_Runrate), '00') AS Month_Runrate,

        month(weekend(Date_Runrate))& year(weekend(Date_Runrate)) as MonthPeriod_Runrate,

        Num(Day(Date_Runrate), '00') AS Day_Runrate,

        Num(Week(Date_Runrate), '00') AS Week_Runrate,

        weekday(Date_Runrate) as Names_of_day,

        date(weekend(Date_Runrate),'MM-YY') as MonthsPeriod_Runrate

          resident Calendar1;

        drop table Calendar1;

       

       

      Now i need to find Min and Max of Date_Runrate where MonthPeriod_Runrate will be current month.

       

      How could i do this.Please help me.