Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

U2LDTDIF.DLL 1

Status
Not open for further replies.

jkupov

Technical User
Apr 28, 2004
101
US
I'm told by a coworker than i need this to perform the DateTimeDiff function. I'm using CR 2011 in a Windows 7 64bit environment while he is using CR9 in a WinXP 32bit environment. The directory he said to intstall it in does not exist in my computer.

Does anyone know where to install this?
 
Hmmm. You should be able to use datediff without adding an additional dll. Datediff can handle seconds, minutes and hours. Use "s" for seconds, "n" for minutes (n instead of m to distinguish it from months), or "h" for hours.

-LB
 
OK, perhaps my problem lies elsewhere then. One of the date fields is a string and the other is stored as date/time.

I tried using TimeValue on the timestamp stored as a string, and subtracting the other timestamp from the TimeValue formula but I get an error saying a number is required on the field stored as date/time.
 
In what format does the date string appear? e.g., dd/MM/yyyy hh:mm:ss.

-LB
 
Is it JUST a time then? NOT a datetime? Or do you have another field that supplies the corresponding date?

-LB
 
Correct- another field provides the date. This particular field is a timestamp denoting how the time that the technician thinks he will take to complete the job. It is actually formatted hh:mm. I was mistaken above when I said mm:ss.

I want to take this field (the string in a mm:ss format) and compare to another field which is stored as DateTime and formatted mm/dd/yyyy hh:mm:ss which is a timestamp of the actual finish time. I need to determine how closely the technicians are estimating the completion time to get a more realistic idea of the true amount of time spent on each particular job rather than using the technician estimates.
 
I did it again- I wish there was a way to edit the last post. The field is indeed hh:mm NOT mm:ss. Also wish there was a way to move this thread to the appropriate forum since it no longer appears to be an "other topics" forum question.
 
I think I have most of it figured out now. I did

time ({string field})- time ({DateTime field) to get a numerical value and called it @TimeTest

then I did time (0,0,0)+ ({@TimeTest)) to get the difference

This works if the string time (tech's estimate) is greater than the actual time- i.e the technician finished earlier than estimated.

However, if the actual time field is greater than the tech's estimate (technician finished later thanestimated) it returns a number in the 23:mm time.

For example

Tecnician estiumated completion at 09:12 and actuall finished at 09:05. I get a return of 0:06:11- That is correct.

However, in another example, a different technician estimated a completion time of 09:17 and finished at 09:23:19 and it returns 23:53:41 instead of a difference of about 6 minutes.

ideally, if the tech finished early I would see negative 06:11 and if he went over, positive 6 minutes

 
Assuming these occur on the same date, then try:

datediff("s",datetime(date({table.actualdatetime}),time({table.estimatedstringtime}+":00")), {table.actualdatetime})

This would return seconds. You can then convert it back to a string by setting this formula equal to "dur" as shown in faq767-3543.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top