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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Want time to display i...
Power Apps
Unanswered

Want time to display in Power Apps: "column in the data source you're updating expects a 'DateTime'"

(0) ShareShare
ReportReport
Posted on by 2

Hello,

 

I am creating a form in PowerApps and trying to make an entry for time mainly.

 

Here is one of the fields that I am adding:

 

arrive time in hour and minutes.

In the excel spreadsheet i have it formatted as "h:mm" but when I use the form it does the date plus time.

I used the toggle to hide the date field on the form.

 

When adding an "Add" button for new entries I get the following error:

"Incompatible type. The 'Arrival' column in the data source you're updating expects a 'DateTime' type and you're using a 'Error' type."

 

Here is the code:

Collect(LHData,{Date:TodayDate.DateTime,Customer:Customer.Text,Arrival:ArriveHour.DateTime,Arrival:ArriveMinute.DateTime,Pallets:Pallets.Number,Seal:SealNum.Number,Notes:Notes.Text})

 

Not sure if I had to make two collect codes for the hour and minute or just one? I tried both and it didn't work.

Categories:
  • TheRobRush Profile Picture
    11,128 Moderator on at

    To start, just a warning, if more than one person will ever use this app at the same time, stop what you are doing now and convert your excel source over to sharepoint or you will eventually hate your life.

    that being said what is all this :TodayDate.DateTime, .DateTime behind everyhting? Do you have several records set up in app that all contain a column called datetime?

  • TheRobRush Profile Picture
    11,128 Moderator on at

    On that note, here's an example of patching in a date time to a sharepoint list, assume its similar to excel but noone really uses excel so I cannot 100% for sure say they have no differences 

    Patch(ParkingRequests, {Title: "Test", StartTime:DateTimeValue("12/25/2023 12:00 PM")})
  • storres123 Profile Picture
    2 on at

    I guess I should have said, it's an excel spreadsheet in SharePoint not on my desktop. 

     

    I have two pieces of information (pertaining to date/time) that I am wanting to capture in the form:

    Date of entry - that's the "TodayDate" header

    Arrive time - the "Arrival" header

     

    And they are linked to two different columns in the sheet so when I create a form it's two separate entries.

     

    However, the Arrival field seems to have an auto date and time linked.

     

    So from your question, would it be wise to ditch the Today Date column and opt for a long date time Arrival format because it would technically capture both items?

     

    Eventually, I would like to calculate the Arrival time against a scheduled time. 

     

    I have a feeling that a date in the arrival time could mess with the formula.

  • TheRobRush Profile Picture
    11,128 Moderator on at

    yah, regardless is the excel sheet is in sharepoint or on your desktop using excel as a datasource for an app that will have more than one person submitting edits to the excel sheet at the same time will eventually result in errors and dataloss. Doesn't matter where the sheet is stored. I'm not sure which column type would be best, excel doesn't really truly understand time and I stopped using it about 5 years ago because started solely working on app building and we do not use excel with those.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Leaderboard > Power Apps

#1
11manish Profile Picture

11manish 381 Super User 2026 Season 2

#2
Mohsin Ali Profile Picture

Mohsin Ali 340

#3
WarrenBelz Profile Picture

WarrenBelz 187 Most Valuable Professional

Last 30 days Overall leaderboard