Convert Numbers To Time In SharePoint

In this article, I will explain How to

Convert Numbers To Time In SharePoint Calculated Field

Convert Numbers To Time In SharePoint Calculated Field


Scenario

I have a SharePoint list, one of its columns is a number column that holds a duration value with minutes.

Convert Number field To Time field In SharePoint Calculated Field

I would like to display the number of minutes as a Time Format (hh:mm) in the SharePoint Calculated field as shown below:

Convert Numbers To Time In SharePoint Calculated Field


Steps

  1. Create a SharePoint List.
  2. Add a new number column for the minute’s value.
  3. Create a calculated field to convert the minute’s value to time format (hh:mm).

Convert Number field To Time field In SharePoint Calculated Field

The number column settings should be

  • The field data type must be a Number.
  • The number of decimal places should be 0.

Show Minutes as a time format in SharePoint

Display Number field as a Time format in Calculated Field Formula

Time Format SharePoint Calculated Field Formula

  • Set the data type returned from this formula to Number with 0 number of decimal places.

Time Format SharePoint Calculated Field setting

  • Save the formula.

Test the Time Format SharePoint Calculated Field Formula

  • Add or edit a new item in your list.
  • The newly calculated field should calculate the time as an hour and minutes based on the assigned number in the minute’s column.

Convert Numbers To Time In SharePoint Calculated Field

Also, you can use any online converter tool to make sure that the calculation has been done successfully.

Test Number to time in SharePoint

Time Format SharePoint Calculated Field Formula Explanation

Hour Calculation

I calculated the hours by dividing the number of minutes by 60 (Minutes / 60) then I used INT function to round down the result to the nearest integer.

Minute Calculation

I calculated the Minutes by getting the fraction result of (Minutes / 60) then multiply this fraction to 60.

Note: Use ROUND(number,num_digits) function to round a specific number to a specified number of digits, when the number of digits is equal to zero so it round to the nearest integer as I did in my formula.


Conclusion

In this article, I have explained How to

  • Convert number field to Time format in SharePoint Calculated Field.
  • Use the INT function in the calculated field.
  • Use the ROUND function in the calculated field.
Download
Applies To
  • SharePoint Online.
  • SharePoint 2019.
  • SharePoint 2016.
  • SharePoint 2013.
  • SharePoint 2010.
See Also
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s