Hi,
I used the DateDiff to get the difference between two time, however, I need to get the average of this time based on the count that I have on group band. for numeric value, if I just divide the numbers by count(), I get the average, but I cannot do it with the time format. please it seems that I need to convert it before to numberic, divide to the Count function (average), and only then to convert to time again. I am not sure if it is this way, but if someone knows how to solve it, I would appreciate it a lot. thx.
AVG - time (based on group band condition)
-
- Posts: 30
- Joined: Mon Jan 29, 2018 11:04 am
-
- Posts: 6254
- Joined: Tue Mar 20, 2018 5:34 am
Re: AVG - time (based on group band condition)
Hello,
Please check the following expression:
{TimeSpan.FromMinutes( AvgD( DateDiff(Date1,Date2).TotalMinutes) )}
Thank you.
Please check the following expression:
{TimeSpan.FromMinutes( AvgD( DateDiff(Date1,Date2).TotalMinutes) )}
Thank you.
-
- Posts: 30
- Joined: Mon Jan 29, 2018 11:04 am
Re: AVG - time (based on group band condition)
Hi Lech, it worked, thx a lot.
Re: AVG - time (based on group band condition)
You are welcome!