2 Replies Latest reply: Feb 4, 2015 11:53 AM by Jose Manuel Martinez Mayoral RSS

    How to Create Week

    alvinford ford

      Hi ,

       

      Request your help to achieve this...

       

      I have the following Data.

       

      YearCityStartDateEndDate
      2013AZ2/8/201415/8/2014
      2013CA12/10/20131/11/2013
      2013AX9/8/201322/8/2013

       

      Would like to derive the Weeks between StartDate and End Date. The First 7 Days between StartDate and EndDate will be considered as Week1 and Next 7 Days will be Week 2 and So on for each City. The Final Output will be as below.


      I have highlighted the City and Week for better understanding indicating every City has Week1 and so on..


      Thank You in Advance...


       

      Start DateEnd DateDateYearCityWeek
      12/10/201320/12/201312/10/20132013CAWeek1
      12/10/201320/12/201313/10/20132013CAWeek1
      12/10/201320/12/201314/10/20132013CAWeek1
      12/10/201320/12/201315/10/20132013CAWeek1
      12/10/201320/12/201316/10/20132013CAWeek1
      12/10/201320/12/201317/10/20132013CAWeek1
      12/10/201320/12/201318/10/20132013CAWeek1
      12/10/201320/12/201319/10/20132013CAWeek2
      12/10/201320/12/201320/10/20132013CAWeek2
      12/10/201320/12/201321/10/20132013CAWeek2
      12/10/201320/12/201322/10/20132013CAWeek2
      12/10/201320/12/201323/10/20132013CAWeek2
      12/10/201320/12/201324/10/20132013CAWeek2
      12/10/201320/12/201325/10/20132013CAWeek2
      12/10/201320/12/201326/10/20132013CAWeek3
      12/10/201320/12/201327/10/20132013CAWeek3
      12/10/201320/12/201328/10/20132013CAWeek3
      12/10/201320/12/201329/10/20132013CAWeek3
      12/10/201320/12/201330/10/20132013CAWeek3
      12/10/201320/12/201331/10/20132013CAWeek3
      12/10/201320/12/201301/11/20132013CAWeek3
      02/08/201415/08/201402/08/20142013AZWeek1
      02/08/201415/08/201403/08/20142013AZWeek1
      02/08/201415/08/201404/08/20142013AZWeek1
      02/08/201415/08/201405/08/20142013AZWeek1
      02/08/201415/08/201406/08/20142013AZWeek1
      02/08/201415/08/201407/08/20142013AZWeek1
      02/08/201415/08/201408/08/20142013AZWeek1
      02/08/201415/08/201409/08/20142013AZWeek2
      02/08/201415/08/201410/08/20142013AZWeek2
      02/08/201415/08/201411/08/20142013AZWeek2
      02/08/201415/08/201412/08/20142013AZWeek2
      02/08/201415/08/201413/08/20142013AZWeek2
      02/08/201415/08/201414/08/20142013AZWeek2
      02/08/201415/08/201415/08/20142013AZWeek2
      09/08/201410/10/201409/08/20142014AXWeek1
      09/08/201410/10/201410/08/20142014AXWeek1
      09/08/201410/10/201411/08/20142014AXWeek1
      09/08/201410/10/201412/08/20142014AXWeek1
      09/08/201410/10/201413/08/20142014AXWeek1
      09/08/201410/10/201414/08/20142014AXWeek1
      09/08/201410/10/201415/08/20142014AXWeek1
      09/08/201410/10/201416/08/20142014AXWeek2
      09/08/201410/10/201417/08/20142014AXWeek2
      09/08/201410/10/201418/08/20142014AXWeek2
      09/08/201410/10/201419/08/20142014AXWeek2
      09/08/201410/10/201420/08/20142014AXWeek2
      09/08/201410/10/201421/08/20142014AXWeek2
      09/08/201410/10/201422/08/20142014AXWeek2


      Regards,

      Alvin.