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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date-time substraction

Status
Not open for further replies.

plt737

IS-IT--Management
Jun 28, 2000
2
US
I have a sql statement like the following:<br>SELECT AVG(86400*(Disp_DT-Entry_DT))/60 AVG_TIME<br><br>How can I make a Crystal formula like the one above?? Disp_DT is Dispatch Time and Entry_DT is Entry Time. My Oracle time field is like the following: 2000,01,31,15,01,27 - <br>yyyy,mm,dd,hh,mm,ss.
 
Create the formula of cal_time:<br>(86400*({demo.Disp_dt}-{demo.Entry_dt}))/60<br><br>Once you get the cal_time, Create another formula avg_time:<br>Average ({@cal_time})<br><br><br>if you want to format time fields, use make range function to get the field in to format.<br><br>I hope this is helpful<br><br>Venkat
 
thanx Venkat -- will give this a try. I believe I tried something like that and got the same number for all entries..... Maybe that says something for my typing skills also.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top