Converting Seconds into Hours and Minutes

Is it possible to convert a column with only seconds into Hours and Minutes?

Hey Zachary!

Yes this is possible! I’ll outline the workflow in the steps below:

  1. Create a new column using the DateFromUnix formula to convert your seconds into Hours and Minutes: DateFromUnix([SecondsColumn])

  2. Add a new column for your Hours and Minutes with the following formulas below:

  • Hour Column: DateDiff(“hour”, Date(“1970-01-01 00:00:00”), [DateFromUnix Column])

  • Minute Column: DateDiff(“minute”, Date(“1970-01-01 00:00:00”), [DateFromUnix Column]) - ([Hour Column] * 60)

  1. Next we will need to add our leading zeros for our hours and minutes. You can do this by creating a new column for both of them using this formula:

If([Hour/Minute Column] < 10, Concat(“0”, Text([Hour/Minute Column])), Text([Hour/Minute Column]))

  1. Finally, you will create one last column that will combine your Hours and Minutes using this formula:

Concat([Hours], “:”, [Minutes])‍