3 Replies Latest reply on Feb 6, 2019 3:21 PM by NAYANA MADHEKAR

# Convert Minutes into HH:MM when duration more than 24 hours

Can somebody help me with a formula to calculate minutes into hh:mm when duration can be more than 24 hours?

Eg: 1774 minutes

• ###### 1. Re: Convert Minutes into HH:MM when duration more than 24 hours

Here you go:

IF [Time in Minutes]>60 THEN

STR(INT([Time in Minutes]/60))+":"+RIGHT("0"+STR([Time in Minutes]%60),2)

ELSE

"00:"+RIGHT("0"+STR([Time in Minutes]%60),2)

END

• ###### 2. Re: Convert Minutes into HH:MM when duration more than 24 hours

Or still better if the output is in days, hours and minutes like this:

IF [Time in Minutes]>60*24 THEN

STR(INT([Time in Minutes]/(1440)))+" days:"+

RIGHT("0"+STR(INT(([Time in Minutes]%1440)/60)),2)+" hours:"+

RIGHT("0"+STR([Time in Minutes]%60),2)

ELSEIF [Time in Minutes]>60 THEN

"00 days:"+

RIGHT("0"+STR(INT([Time in Minutes]/60)),2)+" hours:"+

RIGHT("0"+STR([Time in Minutes]%60),2)

ELSE

"00 days:00 hours:"+

RIGHT("0"+STR([Time in Minutes]%60),2)

END

+" minutes"

2 of 2 people found this helpful
• ###### 3. Re: Convert Minutes into HH:MM when duration more than 24 hours

Awesom!! Thank you