Results 1 to 5 of 5
  1. #1
    Join Date
    Oct 2011
    Posts
    8

    Unanswered: excluding sundays and holidays bw two dates

    hi everyone,

    Can you please give me idea how to exclude sundays and holidays bw two dates.

    i got two dates ia date and care plan date...

    i want careplan date printed within 10 bussiness days of ia date...

    Please help.
    Thank you.

  2. #2
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    Which holidays do you observe? Do you have a table that includes the dates of your holidays? What if one of your dates (care plan or IA date) is a Sunday?

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

  3. #3
    Join Date
    Sep 2011
    Posts
    71
    oK PAVANSAP ,Regardless the issues of holidays ,I can give you a hint to exclude sundays as an Example then we can looking for other days after words
    DECLARE @StartDate DATETIME
    DECLARE @EndDate DATETIME
    SET @StartDate = '2008/10/01'
    SET @EndDate = '2008/10/31'


    SELECT
    (DATEDIFF(dd, @StartDate, @EndDate) + 1)
    -(DATEDIFF(wk, @StartDate, @EndDate) * 2)
    -(CASE WHEN DATENAME(dw, @StartDate) = 'Sunday' THEN 1 ELSE 0 END)
    I wish i'm hopeful for you

  4. #4
    Join Date
    Sep 2001
    Location
    Chicago, Illinois, USA
    Posts
    601
    Pavansap,

    Please DO NOT use abbreviations.

    "bw," is it really too much to type "between?"

    What is an "ia date" and what is a "care plan date?"

    Are those holidays, or classes of holidays?

    I have no idea what those are.

    Please explain what you require in clear, full sentences.

    Thanks.
    Ken

    Maverick Software Design

    (847) 864-3600 x2

  5. #5
    Join Date
    Feb 2004
    Location
    In front of the computer
    Posts
    15,579
    Provided Answers: 54
    The ia date and care plan date are common usage in the Asian (predominantly Indian) health care model. An ia date would be the date when a course of treatement was started, what an American would call an Admission Date. The Care Plan Date is when the diagnosis was formalized and a Treatment Plan was formalized. Their health care model works well for their system, but it doesn't map cleanly to the North American model at all.

    There are a number of issues in this question that confuse me too. Based on the writing style, the question appears to be of Indian (and ESL) origin. Sunday is a very unusual choice of days to exclude in India, since that indicates a Christian calendar.

    The original poster seems to have "hit and run" and not returned, so we don't have a good way to determine what they really meant or wanted.

    -PatP
    In theory, theory and practice are identical. In practice, theory and practice are unrelated.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •