Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Difference between dates + hr

All,

I have two date fields where I need to return the average close time between the two in D H:M. My two date fields are DateCreated - '8/17/15 12:23:09' and CloseDate - 8/18/15 13:12:37' for example. Right now I am working with this equation:

=interval(avg(time#(DateCreated, 'd hh:mm') - time#(CloseDate, 'd hh:mm')), 'd hh:mm')

but am getting an error, can anyone help out?

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Can't answer this without knowing what you are using as dimensions and how the fields are related in your data model (and possibly what the values of the fields are).

View solution in original post

7 Replies
buzzy996
Master II
Master II

try smhign like tis,

=Interval(Sum(ProProductiveTime),'hh:mm:ss') - Interval(Sum(ProProductiveTime),'hh:mm:ss')

or

=Interval(Sum(ProProductiveTime),'d hh:mm:ss')- =Interval(Sum(ProProductiveTime),'d hh:mm:ss')

buzzy996
Master II
Master II

if tht not helps ,look at this.

Re: Peek / Previous Help!

tamilarasu
Champion
Champion

I guess your date format seems wrong in your expression.. Try to change as time#(DateCreated,'m/dd/yy hh:mm:ss') also for closed date as time#(CloseDate,'m/dd/yg hh:mm:ss')..

swuehl
MVP
MVP

Your timestamp interpreting needs to use the correct format codes:  '8/17/15 12:23:09' is coded 'M/DD/YY hh:mm:ss'

=interval(avg(timestamp#(DateCreated, 'M/DD/YY hh:mm:ss') - timestamp#(CloseDate, 'M/DD/YY hh:mm:ss')), 'D hh:mm')

Not applicable
Author

Swuehl,

This seems to be the right formula, but it is only returning a static 6 19:24 across every dimension, so it is only taking one date range into place...

Anonymous
Not applicable
Author

Hi,

Refer to below post. Hope this will answer your question.

Exclude Holidays in Aging

Regards,

Imran K

swuehl
MVP
MVP

Can't answer this without knowing what you are using as dimensions and how the fields are related in your data model (and possibly what the values of the fields are).