Solved

Date/Time Difference in Crystal Reports

Posted on 2010-09-01
3
725 Views
Last Modified: 2013-11-28
I'm creating a report in Crystal Reports XI in which I want to measure the difference (in hours) between two date/time scenarios. One issue is that I'd like to measure business hours only. The other issue is that the dates and times are currently in two different fields. I've used the date difference formula before, but I don't know how to work it for the above issues. Has anyone done this before?
0
Comment
Question by:badmanjack
3 Comments
 
LVL 100

Accepted Solution

by:
mlmcc earned 500 total points
ID: 33579331
Herre is a formula to calculate the workdays
http://www.kenhamady.com/form01.shtml

Here is a formula for workhours
http://www.kenhamady.com/form13.shtml

mlmcc
0
 
LVL 19

Expert Comment

by:GJParker
ID: 33586067
Will you need to exclude weekends and holidays from the calculation ?
0
 
LVL 34

Expert Comment

by:James0628
ID: 33602128
 > The other issue is that the dates and times are currently in two different fields.

 Two different fields (in the same record), or two different _records_?

 Two different fields is the easy one, so I'm guessing that you really meant two different records.  How you handle that may depend on the structure of your data and report.  The simplest thing would probably be if you could change the data so that both datetimes were included in the same record (in two separate fields, of course).  For example, maybe create a view or use a CR command (a query that you create manually) that pulls the two datetimes into one record.

 James
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The first two articles in this short series — Using a Criteria Form to Filter Records (http://www.experts-exchange.com/A_6069.html) and Building a Custom Filter (http://www.experts-exchange.com/A_6070.html) — discuss in some detail how a form can be…
In a multiple monitor setup, if you don't want to use AutoCenter to position your popup forms, you have a problem: where will they appear?  Sometimes you may have an additional problem: where the devil did they go?  If you last had a popup form open…
Learn how to number pages in an Access report over each group. Activate two pass printing by referencing the pages property: Add code to the Page Footers OnFormat event to capture the pages as there occur for each group. Use the pages property to …
What’s inside an Access Desktop Database. Will look at the basic interface, Navigation Pane (Database Container), Tables, Queries, Forms, Report, Macro’s, and VBA code.

932 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

10 Experts available now in Live!

Get 1:1 Help Now