cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
dangladesh
Frequent Visitor

Patching SharePoint - text variable changed to date before updating single line text

I am having a similar problem to the issue described in this post: https://powerusers.microsoft.com/t5/Building-Power-Apps/PowerApps-SharePoint-forcing-a-text-field-to...

 

I am attempting to patch a SharePoint list containing three Single line of text columns. However, since the text being submitted to these columns is a UTC timestamp, the value inserted into the text columns ends up being some other date format.

 

Example: 2020-12-01T06:00:00Z is changed to 12/01/2020 06:00:00

 

The value in this text column needs to be unchanged. I have tried storing the value in a Text variable, using the Text() function in the Patch(), and first putting the text value into a text input control. None of these three strategies have worked.

 

Any suggestions on how to prevent Power Apps or SharePoint from parsing this date and simply treating it as a text value?

 

12 REPLIES 12
dangladesh
Frequent Visitor

Here is an example of the workaround, in Power Automate. The returned value of this call to formatDateTime() is not parsed or reformatted:

formatDateTime('2020-12-01T07:00:00Z', 'yyyy-mm-ddThh:mm:ssZ')

 

View solution in original post

RandyHayes
Super User III
Super User III

@dangladesh 

That is good to know.  Personally, I would not consider that issue with the connector as "design limitation"...I am pretty sure that is a BUG!!  

 

Well, I am glad you were able to devise a workaround for it at least and I will keep this in mind should it cross my path again.

 

AND, thanks for following up and responding to this thread.  This is very important so that other with the issue can discover the problem and the workaround for it...Thank You!!

_____________________________________________________________________________________
Digging it? - Click on the Thumbs Up below. Solved your problem? - Click on Accept as Solution below. Others seeking the same answers will be happy you did.
Check out my PowerApps Videos too! And, follow me on Twitter @RandyHayes

Really want to show your appreciation? Buy Me A Cup Of Coffee!
mousman85
Helper III
Helper III

I've just had this same issue, mine is within PowerAutomate though, i have an external form, sending date responses formated like this: 2021-06-01T14:00:00+00:00"  . Sharepoint decided to format it 01/06/2021 3:00pm no idea why its changing the date to Jan and then the time to 3:00pm the field in SharePoint is set as a text field,  I can't use data /time fields because if the form Date isn't filled in it comes in blank and it won't let you use a blank date in the Date Field, and i have about 20+ different date fields in the form so i'd have to set check conditions for each date field. I hope they solve the issues with date and time in sharepoint. 

Helpful resources

Announcements
PA_User Group Leader_768x460.jpg

Manage your user group events

Check out the News & Announcements to learn more.

Power Query PA Forum 768x460.png

Check it out!

Did you know that you can visit the Power Query Forum in Power BI and now Power Apps

Carousel 2021 Release Wave 2 Plan 768x460.jpg

2021 Release Wave 2 Plan

Power Platform release plan for the 2021 release wave 2 describes all new features releasing from October 2021 through March 2022.

R2 (Green) 768 x 460px.png

Microsoft Dynamics 365 & Power Platform User Professionals

DynamicsCon is a FREE, 4 half-day virtual learning experience for 11,000+ Microsoft Business Application users and professionals.

Users online (2,382)