0 Replies Latest reply: Apr 22, 2013 6:22 AM by Giorgia Michieli RSS

    How to count weeks in a date range?

    Giorgia Michieli

      Hi,

      how can I count, in script,  weeks in a data range, considering that I can have different years?

      If EndDate and StartDate are weeks, I cannot do something like this because I have different years, so I can have week #3 twice, for 2012 and 2013.

       

      Load Distinct

                weekend('$(EndDate)' - Recno() +1) as DATA_GIACENZA

                AutoGenerate( '$(EndDate)' - '$(StartDate)');

       

      How can I do that?
      Thanks a lot!