cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
JR-BejeweledOne
Super User
Super User

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.

 

Image 1Image 1

 

Image 2Image 2

 

Image 3Image 3

 

Image 4Image 4

 

Image 5Image 5



If you like this post, give it a Thumbs up. If it answered your question, Mark it as a Solution to enable other users find it.
2 REPLIES 2
Isa_Watanabe
Frequent Visitor

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.

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.

 

Image 1Image 1

 

Image 2Image 2

 

 

 



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

Helpful resources

Announcements
Ignite 2022

WHAT’S NEXT AT MICROSOFT IGNITE 2022

Explore the latest innovations, learn from product experts and partners, level up your skillset, and create connections from around the world.

Power Apps Africa Challenge 2022

Power Apps Africa Challenge

Your chance to join an engaging competition of Power Platform enthusiasts.

Super User 2 - 2022 Congratulations

Welcome Super Users

The Super User program for 2022 - Season 2 has kicked off!

September Events 2022

Check out all of these events

Attend in person or online, there are incredible conferences and events happening all throughout the month of September.

Users online (4,261)