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

Notifications

Announcements

Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / App not returning date...
Power Apps
Unanswered

App not returning dates from SharePoint

(0) ShareShare
ReportReport
Posted on by 41
Hello, I hope this is an easy fix. I am having trouble with my Power App not returning the date values a user entered into a form. I created a form with two date fields using the date picker from Power Apps. One is a start date and the other is a completed date. I am using the patch function to save the values into a SharePoint list. The SharePoint data types for the start date and completed date are single line of text because I did not want UTC to impact the dates in the SharePoint list. When a user looks at a record in Power Apps all other fields populate except the date fields and the time. I also created two time fields in 24 hour format for hours and minutes are only 15, 30, 45, and 00. Not sure what happened but any guidance would be helpful. 

Also, I can see the date and time in the SharePoint list. 
Categories:
I have the same question (0)
  • WarrenBelz Profile Picture
    152,872 Most Valuable Professional on at
    I am not sure on your UTC reference, but storing dates and times as Text in SharePoint when there is a built-in date/time field type is going to cause complexities in reading from and writing to that you probably can do without. You did not include any code, so it is a bit hard to comment further presently.
  • Pstork1 Profile Picture
    68,678 Most Valuable Professional on at
    Can you provide the patch statement you are using?  If you are creating the dates and times using a date picker you'll need some kind of a Text() function to convert those from dates to text.

    ----------------------------------------------------------------------------------
    If this Post helped you, please click "Does this answer your question" and give it a like to help others in the community find the answer too!

    Paul Papanek Stork, MVP
    Blog: https://www.dontpapanic.com/blog
     
  • ElvirBotic Profile Picture
    41 on at
    Here is the patch function I wrote. Hopefully this helps. @Pstork1

     
    Patch(
       'request',
       Defaults('request'),
       {
           'Start Date': DatePickerCanvas3.SelectedDate,
           'Work Order Number': DataCardValue2.Value,
           'Hour Type': DataCardValue4.Selected,
           Completed: DataCardValue5.Selected,
           User: DataCardValue6.Value,
           'Hours Worked': Value(DataCardValue3.Value),
           'Start Hour': DropdownStartHour.Selected,
           'Start Minutes': DropdownStartMins.Selected,
           'Completed Date': DatePickerCanvas1.SelectedDate,
           'Completed Hour': DropdownCompletedHours.Selected,
           'Completed Minutes': DropdownCompletedMins.Selected,
           Comments: DataCardValue8.Value,
           'Building Lookup': DataCardValue1.Selected
       }
    );
  • timl Profile Picture
    36,328 Super User 2025 Season 2 on at
    Hi  ElvirBotic
     
    If you're using a form to display the record that you saved, the most likely reason for not seeing the correct date in the date picker is because you'll need to convert the text value back to string. 
     
    If you're using the modern date picker control, for the 'Start Date' field, you can try setting the SelectedDate property like so:
     
    DateValue(ThisItem.'Start Date')
      
     
     

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

Forum hierarchy changes are complete!

In our never-ending quest to improve we are simplifying the forum hierarchy…

Ajay Kumar Gannamaneni – Community Spotlight

We are honored to recognize Ajay Kumar Gannamaneni as our Community Spotlight for December…

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 774 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 335 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 248

Last 30 days Overall leaderboard