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

How to find date diff between two dates in hh:mm:ss format? 1

Status
Not open for further replies.

jpdmdc

Programmer
Mar 10, 2005
115
Hi,

I need to find date diff between two dates in hh:mm:ss format.

For example : date1 = 11/1/2007 12:00:00 am
date2 = 11/3/2007 11:30:05 pm

Then I should get 59 hours,30 minutes and 5 seconds.

Could somebody help me with this please!

I'm using Crystal reports 10 and oracle 9i

Thank you!
 
Please see faq767-3543. Set dur equal to:

datediff("s",{table.date1},{table.date2})

-LB
 
Hi Lbass,

thank you so much for you reply. If I want to find this at group level, for example : I have a center where 50 orders were processed and i'm trying to find out the average time taken to complete those 50 orders in that particular center.
Like that i have multiple centers and each center will get multiple orders which will have an order_date and a Completed_date.

Hope you understood my question!

Thank you!
 
Set up the datediff formula {@datediff} at the detail level:

datediff("s",{table.date1},{table.date2})

Then use the formula in the link, setting "dur" to:

average({@datediff},{table.groupfield})

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top