cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
New Member

Error: The type of this argument 'DateText' does not match the expected type 'DateTime". Found type 'Text'

My patch function works for all of my data fields except for my date/time that needs to transfer over. Here is my current formula. 

 

Patch(
Table2,
Defaults(Table2),
{
Campus:ThisItem.Campus,
PatientName:ThisItem.PatientName,
EMSAgency:ThisItem.EMSAgency,
RegistrationConfirmed:ThisItem.RegistrationConfirmed,
Reason:ThisItem.Reason,
CompletedBy:ThisItem.CompletedBy,
EditedBy:ThisItem.EditedBy,
DateText:ThisItem.DateEntered
}
);
Remove(Table1,ThisItem);
Refresh(Table1)

 

The "DateText:ThisItem.DateEntered" is the only piece that is failing to move over. I have tried to change formula to DateText:DateTimeValue(ThisItem.DateEntered) but then it transfers the already-recorded date/time completely wrong.

 

The DateEntered field is a non-editable text field which pulls from a timer. Its formula is:

Text(DateEntered, "[$-en-US]mm/dd/yyyy hh:mm:ssss")

My label that it pulls the date time from is: Set(DateEntered, Now())

5 REPLIES 5
Highlighted
Super User III
Super User III

Re: Error: The type of this argument 'DateText' does not match the expected type 'DateTime". Found type 'Text'

What results do you get if you change that part to;

DateText: Now ()

 

Or

DateText:ThisItem.DateEntered without formatting the variable

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
New Member

Re: Error: The type of this argument 'DateText' does not match the expected type 'DateTime". Found type 'Text'

DateText: Now () - wouldn't patch the already recorded date/time, right? It would record the patched date/time which is not what I'm looking for. 

 

DateText:ThisItem.DateEntered without formatting the variable - is what I have been doing and it returns The type of this argument 'DateText' does not match the expected type 'DateTime". Found type 'Text'

Highlighted
Super User III
Super User III

Re: Error: The type of this argument 'DateText' does not match the expected type 'DateTime". Found type 'Text'

Try using a DatePicker and format it.

If the purpose is to refresh it, you can Use the timer to refresh the DatePicker such that current Time is captured.

In that Case, there Will not be conflict between DateTime and the Text format.

 

The formula would then be

DateText:ThisItem.DatePicker1.SelectedDate

------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

Highlighted
New Member

Re: Error: The type of this argument 'DateText' does not match the expected type 'DateTime". Found type 'Text'

DatePicker does not work either. I've explored this before.

 

I got this working by adding & next to another field and it pulls correctly.

Highlighted
Super User III
Super User III

Re: Error: The type of this argument 'DateText' does not match the expected type 'DateTime". Found type 'Text'

If it resolved then mark your reply as a solution------------

If you like this post, give a Thumbs up. Where it solved your request, Mark it as a Solution to enable other users find it.

 

Helpful resources

Announcements
Community Conference

Power Platform Community Conference

Check out the on demand sessions that are available now!

Watch Now

Experience what’s next for Power Apps

See the latest Power Apps innovations, updates, and demos from the Microsoft Business Applications Launch Event.

Power Platform ISV Studio

Power Platform ISV Studio

ISV Studio is designed to become the go-to Power Platform destination for ISV’s to monitor & manage published applications.

secondImage

Power Platform 2020 release wave 2 plan

Features releasing from October 2020 through March 2021

Top Solution Authors
Top Kudoed Authors
Users online (7,950)