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
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
Super User III
Super User III

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
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

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.

View solution in original post

Anonymous
Not applicable

@v-monli-msft

 

Thanks for your help! It is working now.

 

-Shashanka

Helpful resources

Announcements
secondImage

Experience what’s next for Power Apps

Join us for an in-depth look at the new Power Apps features and capabilities at the free Microsoft Business Applications Launch Event.

Power Apps Community Call

Power Apps Community Call: February

Did you miss the call? Check out the Power Apps Community Call here.

New Power Super Users

Congratulations!

We are excited to announce the Power Apps Super Users!

New Badges

New Solution Badges!

Check out our new profile badges recognizing authored solutions!

Top Solution Authors
Top Kudoed Authors
Users online (67,697)