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

Announcements

News and Announcements icon
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:
  • 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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard