cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Lorem1960
Resolver III
Resolver III

How to obtain the next month when date has been selected from a datepicker?

I have a datetime field and when I select a date for example in march I have another control with the following for

the default property:

 

Text(DataCardValueDateOT.SelectedDate, "mmmm")

 

So in this case it shows March which is fine, but I have another control where I would like to show the next Month, so April,

I tried putting this in the Default Property : Text(Month(DataCardValueDateOT.SelectedDate) + 1,"mmmm")

but it displays January. How can I retrieve the next month when a date is selected for current month?

 

Any help is appreciated.

1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User
Super User

Hi @Lorem1960 ,

Try

Text(
   DateAdd(
      DataCardValueDateOT.SelectedDate,
      1,
      Months
   ),
   "mmmm"
)

 

Please click Accept as solution 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 Thumbs Up.

Visit my blog Practical Power Apps

View solution in original post

2 REPLIES 2
WarrenBelz
Super User
Super User

Hi @Lorem1960 ,

Try

Text(
   DateAdd(
      DataCardValueDateOT.SelectedDate,
      1,
      Months
   ),
   "mmmm"
)

 

Please click Accept as solution 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 Thumbs Up.

Visit my blog Practical Power Apps

Thank you very much Warren, this works and this is what I really needed. Have a nice day!

Helpful resources

Announcements
Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Government Carousel

New forum: GCC, GCCH, DoD - Federal App Makers (FAM)

In response to the unique and evolving requirements of the United States public sector, Microsoft has created Power Apps US Government.

Users online (4,487)