get start date and end date sequence

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • divya birla
    New Member
    • Mar 2011
    • 1

    get start date and end date sequence

    Posted - 03/29/2011 : 06:34:20
    I have a table which contain Topic, Sequence number and no of turns.
    User input the Single Start date and on the basis of which
    series of start date and end date is calculated.

    Let start date= 1 Jan ,2011
    then

    Topic | Sequence number |NoOfTurns | Start date | end date
    ............... ............... ............... ............... ..........
    Theorem | 1 | 5 | 1 jan,2011 | 6 jan,2011
    circle | 2 | 4 | 7 jan,2011 | 11 jan,2011
    triangle | 3 | 4 | 12 jan,2011 | 15 jan,2011



    Start date is the End date of upper row and End date = Startdate + no of turns as days.

    Please help me to get start date and end date sequence
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    You can use a max on the end date for the new start date. And then a dateadd to get the end date. But be aware that 1/1/2011 - 1/6/2011 is a range of 6 days, not 5.

    Comment

    Working...