I am trying to convert numbers to hours, i have looked at all solutions in community but nothing seems to be working. I have used ToDateTime([Time])/1440
but its giving me error as Error: Type mismatch in operator +.
I have made sure to use Select tool and clean the datatype as Double.
Can someone pls help with simple solution, incase of bigger formula pls help with explanation.
Thanks you
Can you give an example input and expected output of what you are trying to do?
Your title says numbers to hours/minutes but the formula and Double type seems to indicate you want a number.
Sure, so i have a column that has hours in numbers, for ex: 7.5. I want to convert 7.5 to 07:30 hrs.
You can use this formula
datetimeformat(DateTimeAdd("1901-01-01 00:00:00", 60*[Time],"minutes"),"%H:%M")
Multiply the 7.5 (Time column) by 60 to get the number of minutes
Add those minutes to a generic date time of midnight and then format to be just the hour and minute.
Thanks for this, but there are certain cells that has number with 6 decimals. for ex 7.139456. its not working on those cell, any refining?
You can use the formula that the previous guy give you, but add a formula before to limite the number of decimals (like round) to make the datetime formula works.
In what way is it not working? Can you share a screenshot or the error message?
Are they coded as numbers or a string?
When I try 7.139456 in the formula I get 7:08 as the result.
User | Count |
---|---|
59 | |
27 | |
25 | |
22 | |
21 |