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

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Formula help - DateAdd
Power Apps
Unanswered

Formula help - DateAdd

(0) ShareShare
ReportReport
Posted on by 240

Hello Everyone 🙂

 

Please could you help with the below, i am trying to add a number of month's to a date based on the months being selectable via a dropdown, its coming up with an error when i use the below. Any help is much appreciated.

 

Formula:
DateAdd(StartDate_dtp.SelectedDate, Value(ContractLength_drp.SelectedText), TimeUnit.Months)

 

Error:
Expected text or a number. Edit your formula so that it evaluates to text or a number.

 

Appy1_0-1691484691826.png


Thanks

Chris

Categories:
I have the same question (0)
  • Verified answer
    v-hanytian-msft Profile Picture
    Microsoft Employee on at
    Re: Formula help - DateAdd

    Hi @Appy1 ,

     

    May I ask waht items of the ContractLength_drp?

     

    We made asample for you.

    vhanytianmsft_0-1691485074609.png

     

     Please try this:

    DateAdd(StartDate_dtp.SelectedDate, Value(ContractLength_drp.Selected.Value), TimeUnit.Months)

    vhanytianmsft_1-1691485089866.png

     

    Hope this will help you,

    Best Regards,
    Tina

  • CC-19121430-0 Profile Picture
    240 on at
    Re: Formula help - DateAdd

    Hello Tina,

     

    The items of my ContractLength_drp is the below:
    SortByColumns(Distinct(Tbl_Funding, Duration),"Value")

     

    What you suggested has worked perfectly though so i thank you very much for your help 🙂

     

    Kind Regards

    Chris

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 757 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 322 Super User 2025 Season 2

#3
MS.Ragavendar Profile Picture

MS.Ragavendar 209 Super User 2025 Season 2

Last 30 days Overall leaderboard