get number of days from two dates

  • hi please help, i need to get the number of days for each month e.g i have @StartDate and @EndDate parameter. Whant i need is if the user select the date 05/06/2011 to 31/08/2011 i should get 25,31,31 and not calculate from the begining of the month if the first day of the month is not selected.

  • Please don't cross post. It fragments replies and waste everyone's time.

    Direct all replies here : http://www.sqlservercentral.com/Forums/Topic1171968-391-1.aspx

  • I'm confused: you started a new thread after getting several replies on the other thread?

    (http://www.sqlservercentral.com/Forums/FindPost1171968.aspx)

    Why?

    Edit: Sorry, Remi. Didn't see your reply. :blush:



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • LutzM (9/8/2011)


    I'm confused: you started a new thread after getting several replies on the other thread?

    (http://www.sqlservercentral.com/Forums/FindPost1171968.aspx)

    Why?

    Edit: Sorry, Remi. Didn't see your reply. :blush:

    I said, NO MORE REPLIES 😀

    Now you make me break my own rule.

    What kind of friend are you Lutz? :hehe:

  • Ninja's_RGR'us (9/8/2011)


    LutzM (9/8/2011)


    I'm confused: you started a new thread after getting several replies on the other thread?

    (http://www.sqlservercentral.com/Forums/FindPost1171968.aspx)

    Why?

    Edit: Sorry, Remi. Didn't see your reply. :blush:

    I said, NO MORE REPLIES 😀

    Now you make me break my own rule.

    What kind of friend are you Lutz? :hehe:

    If you don't like to see any replies, please don't ask a question 😛

    My answer (with a grain of pessimism): A friend is an enemy who just didn't attack yet.



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • Well you've attacked now. So that settles that :-D!

Viewing 6 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply