is there any procedure in sql which excludes weekends and holidays at country level to arrive workday @ date

  • Need procedure or function which calcuates workday in date format , excluding weekends and hooliday at country level .

    Any help .....

  • SQL has no idea what the holidays in your country are. It's possible to write a function that excludes weekends (complex but possible), but not holidays.

    Whose holidays would it use? 16 June is a holiday here, probably isn't where you are.

    Generally for this one creates and uses a calendar table.

    http://weblogs.sqlteam.com/dang/archive/2010/07/19/calendar-table-and-datetime-functions.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 1 (of 1 total)

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