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 / View sorted by a date ...
Power Apps
Unanswered

View sorted by a date and a date/time field not sorting correctly

(0) ShareShare
ReportReport
Posted on by 123

Dear PowerApps Community,


I've been having an issue with a view that sorts by two fields, the first is a date only field and the second is a date/time field. I appreciate that behind the scenes the date only field will have a time component but in theory this should be the same for all records, right?

I am sorting first by Date Completed (actualdate) and then by Date Created, my expectation would be for 3 or 4 records with the same Date Completed, the sort order should effectively be just Date Created. This is instead what I see:
screenshot1.png

You can see for the 8th March the sort is incorrect on the Date Created (far-right column). 

Microsoft support tell me that this is intended behaviour and on a support environment they showed me this: screenshot2.png

It shows different second components for my 'date only' field. They have told me that the only option is to create a pre-create plugin to set the second component to zero. This seems very odd to me, has anyone else had any experience with this or any similar issues?

 

Thanks in advance,


Matt

 

 



I have the same question (0)
  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @MattTaylor ,

     

    That is not expected behavior in my opinion and I am in a demo tenant to try and recreate the situation and I am unable to do so...

     

    I did the following:

    1. Added a "Date Only" field to the Account called Test Date

    2. Modified the Active Accounts view to sort on this date first and then create date second

    3. Tried multiple updates to the fields on the Test date and the sorting always stayed appropriate for every test.

    4.  Created a Power Automate flow to extract the Test Date and format the output to a variable and the time is always set to 12:00:00 AM which is what I expected.

    dpoggemann_0-1624708917652.png

     

    My question is did you convert this field from a Date / Time to a Date Only field?  I think I have heard of issues when this is done where it maintains the time part on the fields for existing records...

    https://www.inogic.com/blog/2015/07/updating-date-values-of-existing-records-after-modifying-the-datetime-behaviour-in-dynamics-crm-online-update-1/

     

    Hope this helps.  Please accept if answers your question or Like if helps in some way.

     

    Thanks,

     

    Drew

  • MattTaylor Profile Picture
    123 on at

    Hi Drew, 

    Thanks for your reply, that's a good point and something I'll have to check - is there any way to tell if the field was changed at some point as it was before my time if it was?

     

    It seemed bonkers to me that this was "by design", so I'm glad someone else agrees! 

  • Drew Poggemann Profile Picture
    9,287 Most Valuable Professional on at

    Hi @MattTaylor,

     

    Sorry I don't know how to check if the field was changed...

     

    Maybe Microsoft has a way to check this?  Another option would be if you had an initial backup saved somewhere that you could restore to another environment but assume that is not the case...

     

    Thanks,


    Drew  

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

#2
Michael E. Gernaey Profile Picture

Michael E. Gernaey 333 Super User 2025 Season 2

#3
Power Platform 1919 Profile Picture

Power Platform 1919 268

Last 30 days Overall leaderboard