This content has been marked as final.
Show 2 replies

1. Re: change minutes to mm:ss
Dan Huff Apr 1, 2013 4:54 PM (in response to Aaron Parry)1 of 1 people found this helpfulAaron
Here is a calculation that may do the trick for you:
str(int([Time])) + ":" + str(([Time]%1)*60)
This basically uses the original field you have in floating format and turns it into the desired string mm:ss format using some algebra. In case you are unaware of its presence, the % sign in this case is Tableau's mod function.
Hope this helps,
Dan

2. Re: change minutes to mm:ss
Aaron Parry Apr 2, 2013 6:51 AM (in response to Dan Huff)Dan,
Thanks for the response! I was able to use this calculation to obtain my desired result:
STR(INT(SUM([SecondsToTime])/3600))
+ ":" +
IF INT(SUM([SecondsToTime])%3600/60)
< 10 THEN "0" ELSE "" END + STR(INT(SUM([SecondsToTime])%3600/60))
+ ":" +
IF INT(SUM([SecondsToTime]) %3600 %60)
< 10 THEN "0" ELSE "" END + STR(INT(SUM([SecondsToTime]) %3600 %60))