Forum Discussion
dougga
Jan 05, 2022Copper Contributor
Error #NUM when converting decimal to dd:hh:mm:ss
I am trying to convert a decimal to dd:hh:mm:ss format but get an #NUM error. It works until I hit an upper limit. I figure out the issue but don't know how to fix it. When I convert a decim...
- Jan 05, 2022
HansVogelaar
Jan 05, 2022MVP
How are you doing this? Please provide detailed information.
- douggaJan 05, 2022Copper Contributor
HansVogelaar I can repro it by doing this in a cell:
This works
=TIME(,,32767)This doesn't
=TIME(,,32768)I am converting seconds to a time span. I am trying for 00:00:00 (h:mm:sec). The first one above works the second I get #NUM
- HansVogelaarJan 05, 2022MVP
Use =32768/86400 and format the result as dd:hh:mm:ss
(86400 is the number of sconds in a day)
- Detlef_LewinJan 05, 2022Silver Contributor
It's all in the support article:
https://support.microsoft.com/en-us/office/time-function-9a5aff99-8f7d-4611-845e-747d0b8d5457