PowerApps Survival Tactic
Problem
- Out of the blue, you suddenly get an "Invalid argument type ... error" with code and data that you haven't changed.
Invalid argument type (Text). Expecting a DateTime value instead.
Solution 1
- Log out of PowerApps
- Close all PowerApps/Office 365 related windows
- Log in again
Solution 2
Sometimes a DateTime value read from your data source loses its "date-ness" and the numeric DateTime value gets interpreted as a String.
This solution converts the String back to a DateTime value as follows: String --> Numeric Value --> Formatted DateTime String --> DateTimeValue.
It's convoluted, but here is the code:
DateTimeValue( Text( Value( MyDateTimeValue ), "[$-en-US]mm/dd/yyyy hh:mm:ss") )

Report
All responses (
Answers (