web
You’re offline. This is a read only version of the page.
close
Skip to main content

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Sudden "Invalid argume...
Power Apps
Unanswered

Sudden "Invalid argument type (Text). Expecting a DateTime value instead." error

(2) ShareShare
ReportReport
Posted on by 49

Robot Happy 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.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") )

 

Categories:
I have the same question (0)
  • VincentM Profile Picture
    68 on at

    Same problem here, all of our applications using the CDS went down during a demo, this gives a really bad image to the product.

     

    Please look into it.

Under review

Thank you for your reply! To ensure a great experience for everyone, your content is awaiting approval by our Community Managers. Please check back later.

Helpful resources

Quick Links

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard