0

I have a Powerapps app to allow user to select a date with dd-mm-yyyy format and direct insert it into Sharepoint list with same format (no time). It works normal but some records from users could insert date with time in Sharepoint List. It shows only date in Sharepoint list but when I export list rows to Excel, some records are with time. It made some steps of Power automate fails when reading data from excel because it accept integer only if it contains time it will have decimal number and caused errors. Would you please advise what's wrong? Thanks a lot.

Joanne

Date settings in PowerApps

Data in Date columns in Sharepoint List

Date columns setting in Sharepoint List

Data in excel column export from Sharepoint List

ahmug
  • 1
  • 4
  • How are you submitting the data from the PowerApp to your SP list? Is it a Patch() function or a SubmitForm()? Could you share the formula? – JBerg Jul 05 '22 at 13:22
  • @JBerg, I submitted the form by "SubmitForm(EditForm1)" – ahmug Jul 07 '22 at 03:07

1 Answers1

0

In Power Automate you can use expressions to remove the decimals.

substring(string(outputs('Compose')),0,indexOf(string(outputs('Compose')),'.'))

Replace outputs('Compose') with your date values. So this will turn 1023.45 into just 1023

JBerg
  • 411
  • 1
  • 3
  • Thanks JBerg, this is what I am doing as workaround. But I want to know the root cause to prevent further handling of the problem. – ahmug Jul 07 '22 at 03:10
  • It looks like your settings are all configured correctly. Try this: https://techcommunity.microsoft.com/t5/sharepoint/cannot-eliminate-time-from-date-and-time-field/m-p/2143263 – JBerg Jul 07 '22 at 13:52