web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

No record found.

Community site session details

Community site session details

Session Id :
Microsoft Dynamics NAV (Archived)

Decimal to duration

(0) ShareShare
ReportReport
Posted on by 194

Hello,

I have a field of type duration which property "Standard Day/Time Unit" is set to "minute".

The field is "Cumulative Net Time"

I have to fill this field with a value coming from an xml port that represents the number of minutes.

the code I use is as follows : 

IF EVALUATE(Rec."Cumulative Net Time",FORMAT(ParseDecimal(Cululative_Net_Time))) THEN;

The problem is that the value  451 is evaluated as 18 days (451/24), and I expect this to be evaluated into 7 hours (451/60).

Is there a way to resolve this problem?

*This post is locked for comments

I have the same question (0)
  • Hannes Holst Profile Picture
    5,767 on at

    Try this

    IF EVALUATE(Rec."Cumulative Net Time",FORMAT(ParseDecimal(Cululative_Net_Time))+'m') THEN;


    By adding a "m" to the end, you tell NAV that the string-value represents Minutes. A "h" represents hours etc.

    Find it here: docs.microsoft.com/.../evaluate-function

  • Galina Georgieva Profile Picture
    194 on at

    Thank you for the suggestion. Now everything is OK.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Responsible AI policies

As AI tools become more common, we’re introducing a Responsible AI Use…

Neeraj Kumar – Community Spotlight

We are honored to recognize Neeraj Kumar as our Community Spotlight honoree for…

Leaderboard > 🔒一 Microsoft Dynamics NAV (Archived)

Last 30 days Overall leaderboard

Featured topics

Product updates

Dynamics 365 release plans