Mastering Time Conversion: From Seconds to Minutes on Make.com

Have you ever found yourself dealing with timestamps in exact seconds format and wondered how to convert them into a more readable minutes and seconds format? If so, you're not alone. This is a common challenge faced by many Make.com users. But don't worry, we've got a solution for you.

The Problem

Let's say you have a data item that returns timestamps like this:

Sentence 1 start time: 92.304

Sentence 2 end time: 95.395

What you want is to convert these timestamps into a format like this:

Sentence 1 start time: 1:53

Sentence 2 end time: 1:59

The Solution

The solution to this problem is to use the “get” and “split” functions. Here's how you can do it:

  1. First, split the timestamp at the decimal point using the “split” function. This will give you two parts: the minutes and the seconds.
  2. Then, use the “get” function to retrieve the first part of the split, which represents the minutes.
  3. Finally, replace the decimal point in the minutes part with a colon using the “replace” function. This will give you the desired format.

Here's the formula you can use:

{{replace(((get(split(92.304; “.”); 1)) / 60); “.”; “:”)}}

Troubleshooting Tips

If you're having trouble with the formula, make sure you're using the correct syntax. The “split” function requires the timestamp and the delimiter (in this case, the decimal point) as arguments. The “get” function requires the split result and the index of the part you want to retrieve (in this case, 1 for the minutes part). The “replace” function requires the string to be replaced, the old character, and the new character.

Conclusion

Converting timestamps from seconds to minutes and seconds format can be a bit tricky, but with the right functions and formula, it's definitely doable. We hope this guide has been helpful. Happy coding!

You do have further questions?

Ask your question via E-Mail: Richard@make-app.de
Book a paid Support & Consulting Session
New Make.com user? Sign up through this Affiliate Link to receive 10.000 operations for FREE.