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.

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
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

Community Connections 768x460.jpg

Community & How To Videos

Check out the new Power Platform Community Connections gallery!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.

Top Solution Authors
Top Kudoed Authors
Users online (2,204)