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 / If condition with mult...
Power Apps
Unanswered

If condition with multiple DateAdd

(0) ShareShare
ReportReport
Posted on by 10

So I have this issue and I'm not sure if it's a PowerApp bug or something I'm doing wrong.

 

If(
DataCardValue37.Selected.Value = "APPROVED - A", DateAdd( Now(), 3, Years ),"dd-mm-yyyy",
DataCardValue37.Selected.Value = "APPROVED - B", DateAdd( Now(), 1, Years ),"dd-mm-yyyy"
)

 

I have this condition where it checks a value of a dropdown (value37) and assigns a date on the Default property of a datetime field. This syntax isn't working for me, says that it has invalid arguments. But if I do this:

 

If(
DataCardValue37.Selected.Value = "APPROVED - A", DateAdd( Now(), 3, Years ),"dd-mm-yyyy",
)

 

It works just fine alone. I tried doing these:

 

If(
DataCardValue37.Selected.Value = "APPROVED - A", Text(DateAdd( Now(), 3, Years ),"dd-mm-yyyy"),
DataCardValue37.Selected.Value = "APPROVED - B", Text(DateAdd( Now(), 1, Years ),"dd-mm-yyyy")

 

but it displays an invalid date (when I hover through the formula it shows the right year 8/31/2024, but it's display si 7/8/2026. I'm really stumped here would appreciate any help!
)

Categories:
I have the same question (0)
  • zmansuri Profile Picture
    6,048 Super User 2024 Season 1 on at

    If(
    DataCardValue37.Selected.Value = "APPROVED - A", DateAdd( Now(), 3, Years ),"dd-mm-yyyy",

    If(
    DataCardValue37.Selected.Value = "APPROVED - B", DateAdd( Now(), 1, Years ),"dd-mm-yyyy"
    ))

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 977

#2
Valantis Profile Picture

Valantis 664

#3
11manish Profile Picture

11manish 530

Last 30 days Overall leaderboard