Skip navigation

Format number as time duration

score 164
You have not voted. Active

What

Support formatting of numbers (seconds, minutes, hours, days) as duration.

Format number as duration.png

How

Support custom formatting such as:

 

data________format_________________result
232336seconds [h]"t "mm"m "ss"s"64t 32m 16s
3872.266667minutes [h]:mm:ss64:32:16
64.537778hours [h]:mm:ss64:32:16
2.689074days [h]:mm:ss64:32:16

 

Good predefined duration formats should be available from a drop-down list.

Custom formatting should also be possible.

 

Another challenge is that numbers formatted as duration also should be formatted as time in axis.

This means that axis should dynamically switch to the most appropriate time unit.

 

Why

- It simplifies formatting of duration.

- Datediff calculations can be used as they are.

- Formatting numeric fields rather than datetime makes it easy to support negative durations and durations beyond 23:59:59 hours.

 

Inspiration

This idea came while reading  Negative Time Value  by  Michelle Mersereau.

 

Related

 

Resources

Formatting Time Durations in Tableau | Drawing with Numbers

Converting Seconds to HH:MM:SS or DD:HH:MM:SS | Tableau Software

 

Questions & Answers

2019-01-04  Time format conversion from seconds to HH:MM:SS in a calculation

2018-12-20  How to get time difference between end date and start date

2018-12-13  Duration format change

2018-12-12  seconds to dd:hh:mm:ss

2018-11-02  Conditional Formatting in Tooltips

2018-07-27  Age old problem of displaying time

2018-07-03  Not able add total in String Measure Values

2018-06-07  Need assistance with "Time since last event" in Days, HH, Min and Sec format

2018-06-05  Calculating total in hh:mm:ss format

2018-06-01  Convert seconds into hours and create time duration

2018-05-16  Turnaround Time in hh:mm:ss format

2018-05-12  How to display total duration for some period?

2018-05-10  How to create from Second to Duration and read duration?

2018-05-02  Summing Time Duration at two different location

2018-04-18  converting Average of seconds into dd:hh:mm:ss format in tableau

2018-04-11  Tableau 10.3: Convert Sum Mins to hh:mm:ss

2018-03-07  How Do I Format Average Number of Seconds as Duration Over Time?

2018-03-06  Working with time durations >24hrs and involving multiple timestamps

2018-02-08  What is the best way to deal with durations where durations are greater than 24 hours in length?

2018-01-08  Duration of process not in minutes. Supposed to be in hh:mm:ss

2017-12-05  Time difference between two columns

2017-12-02  Seconds to HMS

2017-11-30  Unable to do conversion of time to "hh:mm:ss"

2017-09-08  Sum up time values

2017-08-07  calculating average of time in dd:hh:mm:ss format

2017-08-01  Display Date

2017-07-25  Desktop - How to add together several calculated fields that are time durations

2017-07-13  How to convert seconds into MM:SS Format

2017-06-29  Seconds as Minutes & Seconds on Y Axis

2017-06-27  Calculating Elapsed Time w/Averages Properly

2017-06-21  Formatting string value into hh:mm:ss format

2017-06-07  Date Difference Calculated in Hours, But Displayed As Days and Remaining Hours

2017-06-01  Time duration detected as String

2017-04-13  Handling Time Data in Tableau

2016-09-15  How to subtract dates?

2016-08-31  Convert seconds in to HH:MM

2016-06-22  Displaying time durations over 24 hours - [h]:mm:ss

2016-06-02  Converting Excel [h]:mm:ss to Seconds in Tableau When [h] > 24 Hours

2016-04-28  Time Calculations

2016-04-07  I want to write a tooltip that conditions the plural tense of days, minutes, hours and seconds...

2016-03-23  Conducting Experiment: How to Display Hours:Seconds elapsed from start?

2016-02-22  Extract Hour from Date field

2015-12-22  How to convert seconds data into HH:MM:SS

2015-12-12  Show negative values as negative time (eg -06:00)

2015-11-02  Convert Minutes to Time of Day

2015-10-20  How do I convert Seconds to DD:HH:MM:SS ?

2015-09-28  Anyone know why Tableau doesn't recognise a duration period in excel of "[h]:mm:ss", …

2015-07-27  Displaying a date as mm:ss

2015-05-14  How to format number in [h]:mm:ss

2015-01-28  time duration from multiple time stamps within a set

2014-10-23  how to convert calculated time duration between two dates from fraction of day to hh:mm:ss

2014-08-07  Convert numbers to hours:minutes

2014-07-30  Sum Seconds but display in hh:mm:ss format

2014-07-14  Hours in cumulative format

2014-06-30  How to average duration as hh:mm?

2014-03-19  How do i calculate the total time in tableau.

2012-11-13  Sum hours:minutes & result displays more than 24hrs

2012-07-03  Using Time (Hours, Minutes, Seconds) as a Measure

Comments

Vote history