Hi there. Anyone maybe knows how to format duration. I have the case where duration is difference between two datetimes, and would like to have displayed just days and hours, without minutes and seconds. Thanks for any suggestion.
I already did that and the options for day/days and hour/hours are not available.
So if you want to display your duration in full text you cannot convert it to Date Time? :-k
Comments
You can use the round function.
To remove the milliseconds:
To remove the millisecond and seconds:
Object Manager
Object Manager
Can you please give an example how to do that.
I cannot find these options in the help texts.
What expression do you use if you want to display it e.g. like this:
"12 days 3 hours 14 minutes"?
Object Manager
Try F1 on the FORMAT function.
So if you want to display your duration in full text you cannot convert it to Date Time? :-k
Or am I something missing here?
Object Manager
'<Days,2> days <Hours,24> hours <minutes,2> minutes'
I guess.
As I said, there is no option for the days and minutes part in the format parameters.
You pass them as fixed text.
So how you handle plural like day/days?
And what about translation? NLD: Dagen ENU: Days
If you do a FORMAT(duration) NAV handles all these things.
If you convert to a datetime variable you lose all this functionality.
Object Manager