cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
MiteshGovan
Helper III
Helper III

Date Picker

Hi

 

I trust that you are well. 

 

I am struggling with the add date formula

 

DateAdd(DatePicker3.SelectedDate, 30, Days)

 

I receive an error below. 

 

MiteshGovan_0-1614629435525.png

 

Thank you.

 

Kind Regards,

Mitesh

 

1 ACCEPTED SOLUTION

Accepted Solutions
RandyHayes
Super User III
Super User III

@MiteshGovan 

Very good - you can't reference a control like that though.

You will need: DateAdd(DatePicker2.SelectedDate, Value(Date_Estimator_Lbl.Text), Days)

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

View solution in original post

15 REPLIES 15
RandyHayes
Super User III
Super User III

@MiteshGovan 

Where are you trying to use this formula?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Hi

 

I am using a datepicker (StartDate) + dropdown of the total duration = End Date. 

 

I have tried the formula below. But it doesn't work.

 

DateAdd(DatePicker4,Dropdown5_4.Selected.Result,Days)

 

Thank you.

RandyHayes
Super User III
Super User III

@MiteshGovan 

So, not really an answer to the question...Where are you trying to use this formula?  What control and property are you putting this formula in?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Hi 

 

I am using this formula on a label. 

 

Thank you 

RandyHayes
Super User III
Super User III

@MiteshGovan 

Perfect, thanks!

 

Okay, so your formula is perfectly fine.  It should not be giving you any errors on the Label Text property.

 

Are you in a non-US region?  Perhaps your formulas need semicolons and not commas:

DateAdd(DatePicker2.SelectedDate; 30; Days)

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Hi

 

Yes i am based in a Non US region.

 

I have tried the formula's below. They not working. Can you please tell me where am i going wrong. I have tried removing the commas and replacing it with semi-colons but it doesn't work.

MiteshGovan_2-1614720261903.png

MiteshGovan_0-1614720043168.pngMiteshGovan_1-1614720112233.png

 

Thank you

RandyHayes
Super User III
Super User III

@MiteshGovan 

The last picture is definitely an issue, but we need to get the first one working as that is where the real problem is.

 

Place a NEW label on your screen and set the Text property to:

DateAdd(Now(), 30, Days)

no go?  Set it to:

DateAdd(Now(); 30; Days)

 

What do you get and with which one?

 

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Hi

 

Please see the below

 

MiteshGovan_0-1614796228159.png

 

RandyHayes
Super User III
Super User III

@MiteshGovan 

Success!!!  So there is something about your DatePicker control.

And...I'm not sure what is your datepicker control.  In the original post you mentioned datepicker3 but showed a formula image with datepicker2 then in your first reply to me, you mentioned datepicker4...so what is it?

 

All of your formula images you have sent have shown DatePicker2 and none of the others.  So what is it about DatePicker2 and is that really what you want?

 

If so, then change your Test label Text property to :  DatePicker2.SelectedDate  what does that show?

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up. Solved your problem? - Click on Accept as Solution. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too!

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

Power Apps Community Call

Monthly Power Apps Community Call

Did you miss the call?? Check out the Power Apps Community Call here!

secondImage

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV STudio

Power Platform ISV Studio

ISV Studio is the go-to Power Platform destination for ISV’s to monitor & manage applications post-AppSource publish.

Top Solution Authors
Top Kudoed Authors
Users online (34,439)