Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
alec1982
Specialist II
Specialist II

average of time field

hi all,

I have a field with time format 00:00:00..

Need to get average but I am getting wrong format.. any idea how to do that

Sample:

Time

00:01:17

00:00:56

00:02:02

average time is about 1.25 (One minute and twenty five seconds)..

1 Solution

Accepted Solutions
swuehl
MVP
MVP

Use interval to format the output:

=Interval( Avg( Time), 'hh:mm:ss')

or if you need to parse your Time field:

=Interval( Avg( Interval#(Time,'hh:mm:ss')), 'hh:mm:ss')

View solution in original post

7 Replies
swuehl
MVP
MVP

Use interval to format the output:

=Interval( Avg( Time), 'hh:mm:ss')

or if you need to parse your Time field:

=Interval( Avg( Interval#(Time,'hh:mm:ss')), 'hh:mm:ss')

alec1982
Specialist II
Specialist II
Author

thxs!

alec1982
Specialist II
Specialist II
Author

what if I want max date of a filed that the format on it is

Date

MM/DD/YYYY hh:mm:dd AM

sunny_talwar

May be this:

to get max timestamp

TimeStamp(Max(TimeStamp#(Date, 'MM/DD/YYYY hh:mm:ss TT')))

or

to get max date

Date(Floor(Max(TimeStamp#(Date, 'MM/DD/YYYY hh:mm:ss TT'))))

alec1982
Specialist II
Specialist II
Author

thank you

sunny_talwar

Did it work?

alec1982
Specialist II
Specialist II
Author

yes