Through the ‘get task’ function we get data from a task including the ‘time spent’ field. However, a very large number is displayed here. Originally 4 hours are registered but a figure 14400000 appears in the data of Make. When I place this figure on another task in ClickUp it shows 240000:00:00 hours. How can I fix this?
Hi Wim,
ClickUp sends time spent in milliseconds. You’ll have to use a formula to convert it to hours or minutes.
According to the Tokens you can use to parse a date variable, you can use x
.
e.g.: parseDate(time_in_ms; x)
Yes specificially, these formulas will work:
(time_in_ms / 1000 / 3600)
will get you the number of hours
(time_in_ms / 1000 / 60)
will get you the number of minutes
Is 4.time spent a number or a text string? I think it may be a text string so you’re need to parseNumber() on it first before putting it into the formula.
Hey Alex, could that be the cause? Because as I said… when I place only this figure as input it shows 240000:00:00 hours as a result in ClickUp. Or possibly the calculation fails because it is not a number? I want to try converting, like you said, but can you help me how to do this exactly in Make?
I think you used an uppercase X, which means something different
Hi Sam, I tried a small ‘x’…
but it gave the same error message: Invalid number in parameter ‘time’.
Welcome to the Make community! @dodder
That looks like a new question, could you please create a separate topic for this?
While it’s tempting to spam an existing thread, a more effective approach would be to start a new topic just for your question. It helps community experts find and respond to your query quicker, and keeps our space organised for everyone. If you start a new conversation you are also more likely to get help from other users. You can refer others back to a related topic by including that link in your question. Thank you for understanding and keeping our community neat and tidy.
The “New Topic” link can be found in the top-right of the header:
I don’t think this is a new topic. Who would post a text ‘hello.jpg’ with a rather bizar url behind it?
This but without the brackets around it should work just fine. Make sure you set it to Time and to Minutes if you are using this formula.
Also just to clarify - parseDate() gives you a date, not time.
Here is how I set it up for a test and it worked:
Yes!! Thanks Stoyan!