1

I am working on a custom list inside our sharepoint on-premises 2013. and the custom list will store information about videos and audios (i am not doing to upload the actual audios and videos). and I need a field to store the duration of the video or audio. so not sure which field type best achieve this? Currently, I define a field named Duration (in minutes) of type number, and I store the value as following 90 , 120 ,30 , etc. so is using the Number field type the best option to follow? The main issue I am currently facing with using the Number field type, is that I cannot express the duration in a user friendly way, such as 01:10:20 which represents 1 hour + 10 minutes + 20 seconds, and I do not want to have a single line text to store the value as 01:10:20 because I will not be able to query the items or sort them according to their duration values (since I will be sorting string values and not actual duration values)...

so can anyone advice on this, please? Thanks

1 Answer 1

2

The field with NUMBER datatype is the only suitable field to save number values whether it's integer values or float values.

Unfortunately, There is no datatype to hold only TIME or DURATION in SharePoint Column.


[Workaround]

  • As an OOTB solution, Create a calculated field that converts the number in minutes to time.
  • As a Dev Solution, Create a custom data type for time and duration format and this solution requires Dev skils.

For more details, check

3
  • yes i know i can have a calculated column to convert the number in minutes to the following format hh:mm:ss but my question was if the users can enter the data inside the fields in the following format 01:02:30 ? regards
    – John John
    Commented Oct 8, 2018 at 13:16
  • Hahahah, , okay if you know!! share with us the formula !! also you have asked about the best field type to save duration and as I answered there is no data type that matches this format! and I have introduced two options to do that! and finaly you asked about advice! so what's your issue in the provided answers? Commented Oct 8, 2018 at 14:24
  • why you are so happy !!! i am telling you that using formula will allow me to show the value in hh:mm:ss but will not allow me to enter the data in this format. and my question is if sharepoint have field type to support entering data as hh:mm:ss, or what is the best option to do so... and you mentioned it does not have any field type to support entering duration in hh:mm:ss format ,,, so i was not asking for workaround or for dev solution which i am already aware of,, i am asking about field type...
    – John John
    Commented Oct 8, 2018 at 14:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.