Reputation: 1
I have a data-set that has time (hours) data in it.
The time data is given as 0.1123
, 3.1565
, 0.2951
etc (all in hours).
How do I convert it into standard hours and minute format?
Upvotes: 0
Views: 553
Reputation: 11919
Floor([value])
= the number of hours
Floor([value] * 60) % 60
= the number of minutes
Floor([value] * 3600) % 3600
= the number of seconds
Upvotes: 0
Reputation: 136
Once the data has been imported in Tableau. Change the data type of the column to "Date & Time". Tableau data engine automatically understand the time format and change the decimal time to Actual time Refer this Image
MAKETIME Requires three argument(hour, minute, second).Below code parse decimal number "3.1545" as 3 hrs, 9 min (0.15*60) and 16 sec (0.0045*3600)
MAKETIME(INT([DecimalTime]), int(INT(([DecimalTime]100)%100).6), int(INT(([DecimalTime]10000)%100).36))
Upvotes: 1