|
-
Jul 31st, 2008, 04:37 PM
#1
Thread Starter
New Member
Date Comparison in Crystal Reports 9
I am trying to compare two dates in Crystal. I need to see how many days and hours it took to complete a work order. I have a start date and will not always have an end date depending on whether or not the work order was completed.
The date format is currently 1/15/08 10:34 AM.
Any suggestions please?
-
Jul 31st, 2008, 06:12 PM
#2
Hyperactive Member
Re: Date Comparison in Crystal Reports 9
I haven't used it myself, but what about the DataDiff function?
-
Aug 1st, 2008, 08:07 AM
#3
Re: Date Comparison in Crystal Reports 9
Welcome to the forums. 
See the Date/Time Forumlas in this link.
-
Aug 1st, 2008, 10:22 AM
#4
Thread Starter
New Member
Re: Date Comparison in Crystal Reports 9
Thank you both for the advice. I tried using the formula that was provided in the Forumula Date/Time chapter before and for some reason it didn't work that day. I tried it again today and - it worked.
I used this formula format and just formated the dates to show decimal points to account for not only the days but also the time.
{Orders.ShipDate} - {Orders.OrderDate}
Thank you again.
-
Aug 1st, 2008, 10:42 AM
#5
Thread Starter
New Member
Re: Date Comparison in Crystal Reports 9
Next Question- Do you know how I would account for hours and minutes? The formula if just under 1 day of completion gives a .89 figure. I need to account for it actually being almost 21 hours of completion. Do you know how I would manipulate this?
Thanks again.
-
Aug 1st, 2008, 10:49 AM
#6
Thread Starter
New Member
Re: Date Comparison in Crystal Reports 9
Nevermind- I think I may have found how to in the chapter as well. I guess I should have read more.
Thanks again.
-
Aug 1st, 2008, 12:06 PM
#7
Thread Starter
New Member
Re: Date Comparison in Crystal Reports 9
I am now getting a runtime error of Numeric Overflow. The formula that I used to figure out the mintues and seconds is
Time(0,0,0) + ({Orders.CREATION_DATETIME} - {Orders.CLEARED_DATETIME})
Any suggestions how to fix this?
-
Aug 1st, 2008, 01:01 PM
#8
Re: Date Comparison in Crystal Reports 9
How large are the numbers?
-
Aug 1st, 2008, 01:32 PM
#9
Thread Starter
New Member
Re: Date Comparison in Crystal Reports 9
If what you mean is the format of the numbers- 1/15/08 10:34 AM
Example: Creation Date:1/15/08 10:34 AM
Cleared Date: 1/16/08 12:34 AM
There are a few cases where the cleared date is less than the creation date-- I have no idea why the data was entered like that. I almost that this was the problem because the result would be in a negative number. Now- I just don't know.
Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|