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

Community site session details

Session Id : mG5c5R682+OToPeE1+++WU
Power Apps - Building Power Apps
Unanswered

Azure SQL Server - Datetime2 data type showing empty values

Like (1) ShareShare
ReportReport
Posted on 12 Jan 2018 03:14:21 by 33

My app is not showing datetime2 values from my table. It stopped working without any change in the app or the table.

 

It doesn't show up in my collections either while date only columns are working properly. The image bellow shows one collection where the date data type (blue) works and the datetime2 (red) doesn't.

 

I couldn't find any information about current issues with Azure SQL or Powerapps. Any help is appreciated.

 

 

powerapps datetime2

Categories:
  • wyotim Profile Picture
    2,545 on 15 Jan 2018 at 17:44:11
    Re: Azure SQL Server - Datetime2 data type showing empty values

    @MeneghinoVery true! Thank you for that input.

     

    One of the positives of this issue is that I am getting to go through our data and make sure the data type fits the data it holds. We have experienced the data shift you mentioned. At the time, I just compensated for the difference in timezones, not considering the data type being the real issue. Lesson learned! Smiley Happy Thanks again!

  • Meneghino Profile Picture
    6,949 on 15 Jan 2018 at 17:30:55
    Re: Azure SQL Server - Datetime2 data type showing empty values

    @wyotimit is much better to use date type when time is not needed (i.e. dates of documents, birthdays etc.) so that you do not have issues with time zones.  The effect of time zones on datetime types can be that the date is shifted by one day depending on the relative time zones of the server and the app.

  • wyotim Profile Picture
    2,545 on 15 Jan 2018 at 17:19:54
    Re: Azure SQL Server - Datetime2 data type showing empty values

    Thank you for posting that info @Anonymous. I was going to test the datetime type today.

     

    For what it is worth, the date data type works fine so if the time element isn't critical it is possible to use that data type instead. I found some places where we had datetime2 where we didn't need time so I converted them and everything went back to normal for those cases.

  • Community Power Platform Member Profile Picture
    on 15 Jan 2018 at 16:33:19
    Re: Azure SQL Server - Datetime2 data type showing empty values

    This started to happen with Datetime field type also (not just Datetime2) when using SortByCollumn(). My app was working fine. Today I noticed an issue all data collected using SortByCollumn() had the Datetime fields empty. SQL Azure Database.

     

    To Fix remove all SortByCollumn() from data tables containing datetime.

  • Meneghino Profile Picture
    6,949 on 13 Jan 2018 at 08:01:43
    Re: Azure SQL Server - Datetime2 data type showing empty values

    Thank you, I have updated the issues list:

    https://baizini-it.com/blog/index.php/2017/09/28/powerapps-and-azure-sql-database-current-issues/

  • jreimann Profile Picture
    12 on 12 Jan 2018 at 19:59:30
    Re: Azure SQL Server - Datetime2 data type showing empty values

    My PowerApp has the same issue - Azure datetime data was working properly. As of yesterday (1/12/18) there have been no App or database changes, but suddenly the date values no longer appear in the following locations:

     

    - on the edit forms in a text box or a date control

    - in galleries if a Sort is applied (dates do appear in galleries without sort)

     

    Please advise on a timeline for resolution.

  • wyotim Profile Picture
    2,545 on 12 Jan 2018 at 16:15:55
    Re: Azure SQL Server - Datetime2 data type showing empty values

    Yes, thank you @Meneghino for the response and the link. My code is much like @lero's. 

    ClearCollect(TimeSheetUserCollection, 
     Sort(
     Filter('[dbo].[TimeSheet]', 
     EnteredByEmployeeID = CurrentUserID
     ),
     TimeSheetDate,
     Descending
     )
    )

     

    In this code, TimeSheetDate is a datetime2 data type but I also tried sorting by ID (the Primary Key) with the same result. When the sort is removed, the dates show up as expected. And to be clear, this code (and others like it) was working fine for weeks before yesterday.

  • lero Profile Picture
    33 on 12 Jan 2018 at 14:19:44
    Re: Azure SQL Server - Datetime2 data type showing empty values

    Thanks for the link @Meneghino. I'm aware that there are issues with all kind of datetime data types and SQL Connections. I had to do myself many workarounds to make my app work properly.

     

    The thing is that something has changed. Because the issue started without any changes on my side. My code was working fine two days ago.

     

    I can confirm what @wyotim said. There is something wrong with the sort operator. When I remove the sort it works fine.

     

    My code bellow where HoraInicio is a datetime2 data type.

     

    ClearCollect(CollectLancamento;
     SortByColumns(
     Filter('[dbo].[Horas]'; 
     dias_lancamento <= DataCorte; 
     ID_user = Usuario
     ); 
     "HoraInicio"; Ascending
     )
    )
  • Meneghino Profile Picture
    6,949 on 12 Jan 2018 at 09:24:23
    Re: Azure SQL Server - Datetime2 data type showing empty values

    Please see here for current issues with Azure SQL Database.

    @wyotimcan you please provide more specific details (i.e. the Sort syntax) so that I can reproduce and update the list?

    Thank you.

  • wyotim Profile Picture
    2,545 on 12 Jan 2018 at 08:57:00
    Re: Azure SQL Server - Datetime2 data type showing empty values
    I am having the same issue, though it seems tied to the Sort function for me. If I remove Sort and just collect the table, dates show up. Put Sort back in and date columns are blank after the table is collected. I agree that any help in resolving this issue would be most appreciated!

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

Announcing our 2025 Season 2 Super Users!

A new season of Super Users has arrived, and we are so grateful for…

Paul Stork – Community Spotlight

We are honored to recognize Paul Stork as our July 2025 Community…

Congratulations to the June Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 791 Most Valuable Professional

#2
MS.Ragavendar Profile Picture

MS.Ragavendar 410 Super User 2025 Season 2

#3
mmbr1606 Profile Picture

mmbr1606 275 Super User 2025 Season 2

Loading complete