Solved

Date/Time Difference in Crystal Reports

Posted on 2010-09-01
3
728 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 35

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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Hello everyone, Hope you find this as helpful as we did. We have on the company I work for an application built in Delphi V with Crystal Reports 8. We all know that Crystal & Delphi can be temperamental sometimes and the worst thing is, nearly…
In earlier versions of Windows (XP and before), you could drag a database to the taskbar, where it would appear as a taskbar icon to open that database.  This article shows how to recreate this functionality in Windows 7 through 10.
Familiarize people with the process of utilizing SQL Server views from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Access…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

679 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