Data Type:Duration field in a report

Dear Folks

I have field of type duration in report, I m using nav2013r2.

its displays values like : 6 minutes 8 seconds 260 milliseconds

I don’t want to show seconds and the milliseconds.

``

Hi Seemab,

You can use the round function.

To remove the milliseconds: NewDuration := ROUND(Duration, 1000);

Or you can use FORMAT:

FORMAT(DurationVAR,0,'<Hour,2>:<Minute,2>');

This way you can control exactly how you want to show your duration.

I also want to remove seconds

Have you seen my answer: FORMAT is what you need here.

ERROR…!

You should also check out this post:

[View:~/nav/f/developers/33316/convert-duration-as-a-decimal-in-milliseconds-to-days-hours-minutes-and-seconds:320:50]

This happens because FORMAT returns a text not a duration… is the way you do when you need to show something as you want, but not to operate with it. If you need to assign to another duration var, to operate or to save in database, you will need to use what Erik says in his last answer.

A third option would be to do it inside Visual Studio RDLC.

https://navnilesh.blogspot.dk/2015/01/formatting-numbers-and-dates-in-rdlc.html

Yes, if you want to do it inside NAV, then do it directly on the dataset in the fields source property.

Thanks Mr.Erik & Ponc J for your kind support.