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

UTC DateTime format not saving correctly to SharePoint list

I have a PowerApp that saves company holidays to a SharePoint list.    I am saving the UTC value of a date to a single line of text column but it's not displaying correctly in the SP list.   I need that column in the SP list to show the date exactly as it is in the PowerApp.  Any help will be appreciated.

 

  • Image 1 shows a hidden label that is capturing the UTC value of a datepicker control
  • Image 2 shows the patch statement that is patching the text value of the hidden label to the collection - {StartDate: labelStartDateText.Text}
  • Image 3 shows the gallery (collection) with the date picker and the collection value with the UTC formatting
  • Image 4 shows the patch statement to the SP list
  • Image 5 shows the SP list and the single line of text showing a different date format.

 

UTCDate1.pngImage 1

 

PatchCollection.pngImage 2

 

UTCDate.pngImage 3

 

PatchList.pngImage 4

 

List.pngImage 5

2 REPLIES 2
Isa_Watanabe
Level: Powered On

Re: UTC DateTime format not saving correctly to SharePoint list

I think your collection may be playing into this issue.

 

Try the following to narrow down the issue:

  1. Make sure the SharePoint StartDate column is really Single Line of Text.
  2. Refresh your data source for that SharePoint list
  3. Since your original collection is maintaining the column data types of the first item you added (which may have been a date, not text) use ClearCollect to create a new troubleshooting collection with a different name (you may want to create a new button for this).
  4. When writing to your troubleshooting collection, be sure to wrap your StartDate value in the Text() function.
  5. Create a new button to pach this to the original data source.

Re: UTC DateTime format not saving correctly to SharePoint list

So I haven't made any changes yet.   Please see screenshots below. 

 

  • Image 1 is the SP List columns and column types.
  • Image 2 is the App along with functions and values for the 2 labels in question.

 

splist1.pngImage 1

 

UTCDate2.pngImage 2

 

 

 

Helpful resources

Announcements
thirdimage

Power Apps Super User Class of 2020

Check it out!

thirdimage

Power Apps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

sixthImage

Power Platform World Tour

Find out where you can attend!

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

SecondImage

Difinity Conference

The largest Power BI, Power Platform, and Data conference in New Zealand

Top Solution Authors
Top Kudoed Authors (Last 30 Days)
Users online (2,016)