cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Ramonjairo31
Helper II
Helper II

Dateadd in a gallery

Is there a way of getting date add with value inside a collection I want to do something like this but lt isn't working
 
This a button inside the gallery

 

DateAdd(DateValue(ThisItem.StartDate),Value(ThisItem.Days),Days)

 

 

11 REPLIES 11
eka24
Super User
Super User

Try

DateAdd(DateValue(ThisItem.StartDate),DateValue(ThisItem.Days),Days)

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

mdevaney
Super User
Super User

@Ramonjairo31 
Your formula is mostly correct with one change...

DateAdd(ThisItem.StartDate, Value(ThisItem.Days), Days)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up." 

Thanks, but this approach not working 😔

Thanks, but this approach not working either 😔

@Ramonjairo31 

What do you mean by "is not working"  can you please both a "before" and "after" screenshot?  I want to know what it should look like before action is taken and after action is taken. 

@mdevaney 

 

Look the formula is showing this error before I did not show any error  

 

@Ramonjairo31 

Not sure exactly what you are trying to do by putting the code into an icon, but if you place it in the OnSelect property like this you can store the value in a variable.

 

 

Set(myEndDate, DateAdd(ThisItem.StartDate, ThisItem.Days, Days))

 

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

@mdevaney 

 

Could you please test by your side in here not showing any results 

@Ramonjairo31 
First, change your Text Input for Start Date and End Date into DatePickers.  Then put this code in the Default for End Date.

DateAdd(ThisItem.DatePicker_StartDate, Value(ThisItem.TextInput_Days.Text), Days)

 

---
Please click "Accept as Solution" if my post answered your question so that others may find it more quickly. If you found this post helpful consider giving it a "Thumbs Up."

 

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

Power Platform Call June 2022 768x460.png

Power Platform Community Call

Join us for the next call on June 15, 2022 at 8am PDT.

PA Virtual Workshop Carousel 768x460.png

Register for a Free Workshop

This training provides practical hands-on experience in creating Power Apps solutions in a full-day of instructor-led App creation workshop.

PA.JPG

New Release Planning Portal (Preview)

Check out our new release planning portal, an interactive way to plan and prepare for upcoming features in Power Platform.

Top Solution Authors
Top Kudoed Authors
Users online (1,637)