Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to convert sum(seconds) into minutes

Hi,

Can anyone suggest me how to convert value 454435 into minutes?

I have used below not sure whether correct or not?

=Sum(interval(Salestime/60, 'mm'))

Thanks.

8 Replies
buzzy996
Master II
Master II

TRY THIS

=Interval(Sum(45443/60),'D hh:mm')

maxgro
MVP
MVP

replace 45.... with expr

=interval(interval#(454435, 'ss'), 'mm')

Not applicable
Author

Thanks. what D means?

buzzy996
Master II
Master II

seems it's assuming as Day,the above syntax is worked for u?

Not applicable
Author

Thanks. actually It is not day. it is seconds.

can you let me know can I use the above expression if I have data as below

84842572646

5546835867579

4567265746

Not applicable
Author

Thanks. how to change the same expression if I need to convert into weeks, days, hours,minutes

Please let me know.

Ralf-Narfeldt
Employee
Employee

Dates

You can use the following symbols to format a date. Arbitrary separators can be used.

D

To describe the day, use the symbol "D" for each digit.

M

To describe the month number, use the symbol "M".

  • Use "M" or "MM" for one or two digits.
  • "MMM" denotes short month name in letters as defined by the operating system or by the override system variable MonthNames in the script.
  • "MMMM" denotes long month name in letters as defined by the operating system or by the override system variable LongMonthNames in the script.
See: MonthNames and LongMonthNames
YTo describe the year, use the symbol "Y" for each digit.
WTo describe the weekday, use the symbol "W".
  • "W" will return the number of the day (for example 0 for Monday) as a single digit.
  • "WW" will return the number with two digits (e.g. 02 for Wednesday).
  • "WWW" will show the short version of the weekday name (for example Mon) as defined by the operating system or by the override system variable DayNames in the script.
  • "WWWW" will show the long version of the weekday name (for example Monday) as defined by the operating system or by the override system variable LongDayNames in the script.

See: DayNames and LongDayNames

Examples: (with 31st March 2013 as example date)

YY-MM-DDdescribes the date as 13-03-31.
YYYY-MM-DDdescribes the date as 2013-03-31.
YYYY-MMM-DDdescribes the date as 2013-Mar-31.
DD MMMM YYYYdescribes the date as 31 March 2013.
M/D/YYdescribes the date as 3/31/13.
W YY-MM-DDdescribes the date as 6 13-03-31.
WWW YY-MM-DDdescribes the date as Sat 13-03-31.
WWWW YY-MM-DDdescribes the date as Saturday 13-03-31.

Times

You can use the following symbols to format a time. Arbitrary separators can be used.

h

To describe the hours, use the symbol "h" for each digit.

m

To describe the minutes, use the symbol "m" for each digit.

s

To describe the seconds, use the symbol "s" for each digit.

fTo describe the fractions of a second, use the symbol "f" for each digit.
tt

To describe the time in AM/PM format, use the symbol "tt" after the time.

Examples: (with 18.30 as example time):

hh:mmdescribes the time as 18:30
hh.mm.ss.ffdescribes the time as 18.30.00.00
hh:mm:ttdescribes the time as 06:30:pm

Time stamps

The same notation as that of dates and times above is used in time stamps.

Examples: (with 31th March 2013 18.30 as example time stamp):

YY-MM-DD hh:mmdescribes the time stamp as 13-03-31 18:30
M/D/Y hh.mm.ss.ffffdescribes the time stamp as 3/31/13 18.30.00.0000
Anonymous
Not applicable
Author

Maybe I'm missing something, but why not just divide by 60:

Salestime/60