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 / (dateadd( dtpstartdate...
Power Apps
Unanswered

(dateadd( dtpstartdate.selecteddate(7),timeunit.days)) error fomula

(0) ShareShare
ReportReport
Posted on by
how do i resolve this date due formula on fx, the ''dtpstartdate'' is not fetching, hence the formula ''dateadd(
dtpstartdate.selecteddate(7),timeunit.days)'' is giving an error
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    155,315 Most Valuable Professional on at
    This format should work
    DateAdd(
       dtpstartdate.SelectedDate,
       7,
       TimeUnit.Days
    )
     
    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
  • WarrenBelz Profile Picture
    155,315 Most Valuable Professional on at
    A quick follow-up to see if you received the answer you were looking for or if you need further assistance.

    Please click Does this answer your question if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it a Like.
    MVP (Business Applications)    Visit my blog Practical Power Apps    LinkedIn   
  • IW-11020819-0 Profile Picture
    2 on at
    Hello,
     
    I have the same problem. FX does not find "SelectedDate". It is not suggested and marked as an error. The properties of the card is shown as Date Picker. I could not find a solution so far.
    Unbenannt.PNG
  • WarrenBelz Profile Picture
    155,315 Most Valuable Professional on at
    If dtpStartDate is that Classic Date Picker control above the control with the formula, then that is perfectly valid code and should not error. I suggest you try with two new date pickers as something may be corrupt. I will add below the actual code from your uploaded image as it is different in your post
    DateAdd(
       dtpstartdate.SelectedDate,
       7,
       TimeUnit.Days
    )
    
  • Apurva Profile Picture
    93 on at
    If dtpStartDate.SelectedDate is Blank(), the DateAdd function will throw an error. 

    To handle this, try the following approach and please let me know if it works:

    If(IsBlank(dtpStartDate.SelectedDate), Blank(), DateAdd(dtpStartDate.SelectedDate, 7, TimeUnit.Days))

  • WarrenBelz Profile Picture
    155,315 Most Valuable Professional on at
    An empty date picker should not cause that error - test below
     
     
     
  • CU17020509-0 Profile Picture
    2 on at

    The issue you're facing with the formula might stem from how the dtpstartdate is being referenced. When using formulas like dateadd(dtpstartdate.selecteddate(7), timeunit.days), it’s important to ensure that the syntax is correct and the dtpstartdate control is being properly referenced. The formula you're using seems to be incorrectly written, and that's why it's giving you an error.

    The correct approach would be something like this:

    DateAdd(dtpstartdate.SelectedDate, 7, TimeUnit.Days)
     

    DateAdd(dtpstartdate.SelectedDate, 7, TimeUnit.Days)

    Here, dtpstartdate.SelectedDate gets the selected date from the dtpstartdate control. Then, DateAdd adds the specified number of days (7 in your case) to that date, with TimeUnit.Days defining that you're adding days.

    Another key thing to check is whether the dtpstartdate control actually has a valid date. If the control is not initialized with a date or is left empty, that could lead to errors as well. Be sure that the date picker control is set with a valid date before attempting to use it in a formula.

    Lastly, it's also essential to ensure that the environment you're working with (like PowerApps, Excel, or another platform) supports this syntax. Different platforms may have slightly different ways of handling date and time functions, so it's worth checking the documentation for the specific platform you're using.

    If you're still running into trouble, it would be helpful to know the specific platform you're working with, and I can assist you further from there!

  • timl Profile Picture
    37,137 Super User 2026 Season 1 on at
     
    I recognise your question from the exercise in the Power Up program.
     
    At around 6:20 into Video 6, the instruction is to rename the auto-generated date picker to dteStartDate
     
    It's possible that you selected the parent card rather than the date picker during this rename process. If that's the case, that would explain the problem.
     
    Therefore, I would double check that you renamed the correct control.
     
     
  • CU02051518-0 Profile Picture
    2 on at

    Integrating SSO with the Power Platform can be a bit of a balancing act, especially when you are trying to ensure the token exchange happens seamlessly across different environments. I have definitely hit that wall where the authentication flow seems to break down during the initial handshake, and it usually turns out to be a misconfiguration in the tenant-level trust settings. It is incredibly frustrating when you know the credentials are correct but the portal just keeps spinning.

    I was working on a similar setup recently to standardize my own workflows, and it really forced me to deep-dive into the Azure AD integration points to see where the redirect was stalling. Once you get the service principal permissions mapped out correctly, it usually stabilizes, but the debugging process is definitely not for the faint of heart.

    Are you seeing specific error codes in the browser console when it fails to authenticate, or is it just hanging at the landing page? Sometimes clearing the application cache or re-validating the reply URLs in the app registration can clear up those persistent login loops.

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

Introducing the 2026 Season 1 community Super Users

Congratulations to our 2026 Super Users!

Kudos to our 2025 Community Spotlight Honorees

Congratulations to our 2025 community superstars!

Congratulations to the April Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
Vish WR Profile Picture

Vish WR 899

#2
Valantis Profile Picture

Valantis 571

#3
11manish Profile Picture

11manish 499

Last 30 days Overall leaderboard