Solved

DateDiff Expression in SSRS / How to calculate working days?

Posted on 2011-09-12
5
5,237 Views
Last Modified: 2014-08-20
I have the following expression in an SSRS report:

=IIF(DateDiff("d",Fields!OrderDate.Value, Now())>2,"Overdue",Fields!JobStatus.Value)

Open in new window


The current interval is set to "d" for day.  I am looking to find the difference in the number of working days.  I have tried "dw" and "w" but neither seem work.  Any thoughts?
0
Comment
Question by:goodmanro
5 Comments
 
LVL 9

Expert Comment

by:edlunad
Comment Utility
There is no direct way to do it, but you can try something like the expression on this thread...

http://social.msdn.microsoft.com/Forums/en/sqlreportingservices/thread/f7c567be-468e-43ed-8248-f13f6f666a7e
0
 

Author Comment

by:goodmanro
Comment Utility
Anyone have a more simplistic solution?
0
 
LVL 9

Accepted Solution

by:
mimran18 earned 125 total points
Comment Utility
0
 
LVL 21

Expert Comment

by:Alpesh Patel
Comment Utility
0
 

Author Closing Comment

by:goodmanro
Comment Utility
This script was very helpful.  I modified it for the US calendar and it worked without error.
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Have you ever had to extract data from a Microsoft SQL Server database and export it to an Excel file, but did not want to use a DTS package? The concept in this article is not new, but it is the answer and will also work on 64-bit SQL boxes.   …
Introduction Earlier I wrote an article about the new lookup functions (http://www.experts-exchange.com/A_3433.html) that ship with SQL Server 2008 R2.  In this article I’m going to show you another new feature of SSRS 2008 R2, this time in the vis…
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

763 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now