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 / Date Format Problem
Power Apps
Unanswered

Date Format Problem

(0) ShareShare
ReportReport
Posted on by 10

I've created an App with a form connected to an Excel table.
My form has one date picker that is linked to a column in my excel file formatted as Short Date.


My date picker (DateValueInival1) has the following expression on the DefaultDate property:

If(
 varinival1 = Blank(),
 Today(),
 varinival1
)

The variable varinival1 is set on the OnSelect property of a button, with the following expression:

Set(
 varinival1,
 Text(DateValueIniVal1.SelectedDate)
)

I have performed multiple tests and the date was being passed to the excel table with the correct format (DD/MM/YYYY).
But, since I have shared my app with my coworkers I've noticed that sometimes the date starts to be passed with the following format: 2023-02-28T00:00:00.000Z and the excel column format automatically changes to General which also messes up the previous rows inserted (they start appearing as an integer number)
And when that happens, all the following rows will have the date in that format until I go to my excel file and manually edit those rows. After that, the date will be passed correctly again (DD/MM/YYY) until the same problem occurs.
I have tried to pin point the action that causes this change of behavior but was unable to, since I noticed this happening when my coworkers performed the same operation (they pressed the button to submit once, and it was ok, submited again, it was ok and they submited again and it was not).
I have also tried to wrap the expression in the DefaultDate property of my date picker in both Text and DateValue functions but the problem persisted.
I have also assured that my coworkers are using the same regional format as my self.
Do you have any idea of what can be causing this problem?

Thank you

Categories:
I have the same question (0)
  • TheRobRush Profile Picture
    11,128 Moderator on at

    Try this

    Set(
     varinival1,
     Text(DateValueIniVal1.SelectedDate, "dd/mm/yyyy")
    )
  • Unknown_ Profile Picture
    10 on at

    I have tried it, but it didn't fix the problem

  • TheRobRush Profile Picture
    11,128 Moderator on at

    Not sure if @WarrenBelz  or @timl  maybe have some insight on this that I don't, but will tag them just in case. Stopped using Excel about 6 years ago myself because it's just not a good datasource for powerapps, moreso when multiple people are making edits on the same file, as if there is any simultaneous edits you lose data. Excel also doesn't /really/ understand time and just guessing I'd go with that maybe being the culprit as to why it works sometimes and then not others. 

     

    Could also do a quick search of varinival on your app just to ensure theres not leftover references to it somewhere mucking things up.

  • WarrenBelz Profile Picture
    153,051 Most Valuable Professional on at

    @Unknown_ ,

    Just adding to @TheRobRush 's comments - Excel when used as a Power Apps data source is not the best option and in particular dates are not handled the way you expect at times. Do you have access to SharePoint Lists - if so all of this will go away.

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 711 Most Valuable Professional

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 319 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard