Skip to main content
Business Central forum
Suggested answer

Can you sum Time?

editSubscribe (0) ShareShare
ReportReport
Posted on by UG Leader

Hi,

I would like to know if you can sum Time variables. My goal is to be able to sum Times of a client to be able to invoice correctly.

Thanks.

Jorge Ramos Carol

Categories:
  • Suggested answer
    YUN ZHU Profile Picture
    YUN ZHU 59,873 Super User on at
    RE: Can you sum Time?

    Hi, hope the following will help.

    Working with Duration Data Type:

    https://yzhums.com/9273/

    Thanks.

    ZHU

  • Suggested answer
    RockwithNav Profile Picture
    RockwithNav 6,560 on at
    RE: Can you sum Time?

    See if Duration Data type gonna help you?

  • Suggested answer
    Vaishnavi J Profile Picture
    Vaishnavi J 3,052 on at
    RE: Can you sum Time?

    Hi,

    You can subtract datatype time in Business Central, but you can't add time datetype. Only an integer can be added to time. The amount of milliseconds to increase is an integer. You could convert an integer to a second time.

    If my answer was helpful to you, please verify it so that other users know it worked. Thank you very much.

  • Suggested answer
    Inge M. Bruvik Profile Picture
    Inge M. Bruvik 32,714 Super User on at
    RE: Can you sum Time?

    You can see here how you can calculate duration:

    https://docs.microsoft.com/en-us/dynamics365/business-central/dev-itpro/developer/methods-auto/duration/duration-data-type

    That should let you sum duration for different time periods.

Helpful resources

Quick Links

What Motivates a Super User?

We know many of you visit the Dynamics 365 Community and Power Platform…

Demystifying Copilot with Georg Glantschnig…

Industry experts answer burning questions directly from our amazing Community…

Setting Up Knowledge Sources for Copilot…

Look at how configuring a comprehensive knowledge base is crucial…

Leaderboard

#1
Andre Arnaud de Calavon Profile Picture

Andre Arnaud de Cal... 283,030 Super User

#2
Martin Dráb Profile Picture

Martin Dráb 222,562 Super User

#3
nmaenpaa Profile Picture

nmaenpaa 101,138

Product updates

Dynamics 365 release plans