Display only "Days" in a Duration field

Taylor W
Mega Expert

Using a Duration field, we would like to only display "Days" rather than the OOB "Days, Minutes, Seconds". The Duration would be between a custom field called "Start Date" (date field) and the current date (today). I have tried a handful of different solutions on the community but nothing seems to work. Does anyone have any quick tips on how to solve this? Thanks!

2 REPLIES 2

Anurag Tripathi
Mega Patron
Mega Patron

Hi,

You can set the max unit on the duration field by adding the attribute mentioned below

max_unit=hours

The value can be days, hours, minutes or seconds and that is the max unit , but it will still show the lower units.

For if of you set hours the duration field will show hours:minutes

If you only want to show hours ill suggest you just calculate it manually and show it on an integer field.

Check this page for more information: Set a duration field value

 

-Anurag

-Anurag

Thanks Anurag! Unfortunately this does not meet our need. Using an integer field is a fall back solution we have explored but we would like to leverage the Duration field type if possible