0

Good morning,

I have a Power Apps Canvas form (connected to a SharePoint list) where I have a date picker field with a weird requirement.

I need the Datacard's error message to read "Must be a Sunday" IF the Selected Date is NOT a Sunday. How could I make this happen?

Thanks!

1 Answer 1

1

You can check the day of selected date using Weekday function like:

Weekday(DateControlName.SelectedDate)

So, try setting Text property of error message label control to:

If(Weekday(DateControlName.SelectedDate)=1,"","Must be a Sunday") 

OR

If(Weekday(DateControlName.SelectedDate,StartOfWeek.Sunday)=1,"","Must be a Sunday") 

Where DateControlName is the name of your date picked control and 1 is to check for "Sunday".

1
  • 1
    Thanks Ganesh. The second formula is exactly what I needed.
    – Quilly
    Commented Jan 17 at 20:16

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.