Skip to main content

Notifications

Announcements

No record found.

Microsoft Dynamics 365 | Integration, Dataverse...
Suggested answer

Durations with month

Posted on by 3,962

Hi community,

 

is it possible to add a uration of 3 or 6 month?

 

I have a column defined as duration.
When I enter "3 months" it is replaced after saving with "3 minutes".

When entering a "3" only, then only minutes, hours and days suggested.

Only thing, that I need are weeks, months and years.


I'm sure there is a possibility ...

 

Thanks,

AndKan.

  • RE: Durations with month

    Hi @Syndicate_Admin ,

    input with '90 days' works ... but that's not useable for endusers to enter 'days'

     

    I need such a longer duration for a contract, which runs i.e. 1 year. Duration: 1 year.

    This contract can be canceled/terminated 3 month before year of contract ends.

    If contract not canceled 3 month before, it runs one year again.

     

    In table there are 3 fields, user inputs:

    startofcontract (date)

    runtime (duration)

    termination (duration)


    I solved this problem with choices so users can select a duration like 1year, 1month.

    A date field is calculated with choice duration.

    Field termination_date (date) is calculated depending on choice termination_duration (choice):

     

    if (termination_duration eq 'year') 
    { 
      termination_date = AddYears(1, startofcontract); 
    }
    elseif ( termination_duration eq 'month') 
    { 
      termination_date = AddMonths(1, startofcontract); 
    }]

     

    Microsofts solution to save durations as minutes is not useable in my case, because not every month has same count of minutes. And so there is a difference between AddMonths(1, startdate) and AddMinutes(30*86400, startdate).

    startdateAddMonth(1, startdate)AddMinutes(30*86400, startdate)
    Jan 1stFeb 1stJan 30th
    Mar 1stApr 1stApr 1st

     

    BR,

    AndKan

  • Suggested answer
    Community Member Profile Picture
    Community Member Microsoft Employee on at
    RE: Durations with month

    You could try 90 days.

    Otherwise, you could do two field - To/From (date/time).

    If you provide more of your end goal I can provide a better option.

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

December Spotlight Star - Muhammad Affan

Congratulations to a top community star!

Top 10 leaders for November!

Congratulations to our November super stars!

Tips for Writing Effective Suggested Answers

Best practices for providing successful forum answers ✍️

Leaderboard

#1
André Arnaud de Calavon Profile Picture

André Arnaud de Cal... 291,280 Super User 2024 Season 2

#2
Martin Dráb Profile Picture

Martin Dráb 230,214 Most Valuable Professional

#3
nmaenpaa Profile Picture

nmaenpaa 101,156

Leaderboard

Product updates

Dynamics 365 release plans