cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Anonymous
Not applicable

Invalid Argument Type. Expecting a Number Value

Hi Team,

 

I'm working on a PowerApps form that has to compare a date with today's date. but I'm getting the error messages (attached). May I request you to help me out with that?

When I change the type from Text to Numbers though, no values are returned. I just got a blank in the field.

 

Thanks,

Shashanka

2 ACCEPTED SOLUTIONS

Accepted Solutions
v-monli-msft
Community Support
Community Support

Hi @Anonymous,

 

The formula should be:

DateTimeValue (TextInput3.Text,  "en-us") > Today()

"en-us" should be your local place. As Today() work with the local time of the current user.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

Hi @Anonymous,

 

I just tested with this formula and it works for me:

Capture.PNG

 

Notice that in TextInput3(mine is called TextInput2), the formula should be:

DateAdd(DatePicker1.SelectedDate,Value(TextInput1.Text))

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

5 REPLIES 5
timl
Super User
Super User

Hi Shashanka

 

Assuming that TextInput3 is the text input control where you enter a date, instead of the condition that you're currently using (TextInput3 >Today()), the following formula should work without any errors.

 

DateTimeValue (TextInput3.Text,  "en-US") > Today
v-monli-msft
Community Support
Community Support

Hi @Anonymous,

 

The formula should be:

DateTimeValue (TextInput3.Text,  "en-us") > Today()

"en-us" should be your local place. As Today() work with the local time of the current user.

 

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

Hi timl,

 

Thank you for the quick response!

 

In this case, DatPicker1 is where a date is entered. TextInput1 is where a whole number is entered. This is added to the date in the DatePicker1 field. Textinput3 is where the date with the added days needs to be returned.

 

If the retuened date is greater than today, I need to have it highlighted.

 

Thanks again!

Shashanka 

Hi @Anonymous,

 

I just tested with this formula and it works for me:

Capture.PNG

 

Notice that in TextInput3(mine is called TextInput2), the formula should be:

DateAdd(DatePicker1.SelectedDate,Value(TextInput1.Text))

Regards,

Mona

Community Support Team _ Mona Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Not applicable

@v-monli-msft

 

Thanks for your help! It is working now.

 

-Shashanka

Helpful resources

Announcements
October Events

Mark Your Calendars

So many events that are happening this month - don't miss out!

Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

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

Users online (3,802)