cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
jaiyeko
Frequent Visitor

Help on a formula on PowerApps?

I have an app where users can select either a red, amber or green button and based on it, i want to create a formula that adds a certain amount of months to today's date:

 

If user press Red, Today() + 3 months

                    Amber: Today() + 6 months

                    Green: Today() + 12 months

So if i press Red, i will get 08/01/2020

 

How can i construct the formula to yield the added amount of month?

 

1 REPLY 1
mdevaney
Super User III
Super User III

@jaiyeko 

You can use the DATEADD function like this:

 

Red: DateAdd(Today(), 3 , Months)

Amber: DateAdd(Today(), 6 , Months)

Green: DateAdd(Today(), 12 , Months)

 

Here's the general function parameters:

DateAdd( DateTimeAddition [, Units ] )

 

Link to Documentation

https://docs.microsoft.com/en-us/powerapps/maker/canvas-apps/functions/function-dateadd-datediff

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

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (68,856)