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

Announcements

News and Announcements icon
Community site session details

Community site session details

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

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:
  • Verified answer
    v-hanytian-msft Profile Picture
    Microsoft Employee on at

    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

    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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 337 Super User 2026 Season 2

#2
M Bilal Khan Profile Picture

M Bilal Khan 250

#3
Mohsin Ali Profile Picture

Mohsin Ali 225

Last 30 days Overall leaderboard