Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
pauluk__
Contributor III
Contributor III

Adding custom strings to formats (interval, date, time)

Hi,

I'm using the interval function to work out the period between two datetime values, in days and hours, as below:

Interval(ReloadTime() - L_DispatchRequestTime, 'd - hh')

Whilst this gives the correct results it looks very confusing. I'm looking to add my own custom labelling to the format so I can something like:

'1 day 5 hours'

Is there any way of adjusting the formatting so I can fully customise the labelling, or get the result above?

Thanks in advance.

2 Replies
marcus_sommer

Try something like this: =replace(replace(interval(1.55, 'd X - h Z'), 'X', 'day(s)'), 'Z', 'hours')

- Marcus

pauluk__
Contributor III
Contributor III
Author

This works great, thanks.