cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jakedawson
Regular Visitor

Countif date not working as expected

Hey guys have an issue wondering if anyone knows why.
I have an app that I am trying to count the number of items that are in between 2 dates in a SharePoint list. But it seems to be a day off. e.g if I put between the 2nd and the 3rd it is saying 7 records when I am expecting 0. If I put the 3rd to 3rd it gives me 0. All of the record in the list are for Monday the 1st.
 
I've attached images of the result and data source 
1 ACCEPTED SOLUTION

Accepted Solutions
WarrenBelz
Super User III
Super User III

Hi @Jakedawson ,

The issue is that created is a date and time whereas the date picker is a date only at 0:00.

The problem is the end date as everything created on that date will be after the date chosen in the date picker, so you need to add an extra day.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

4 REPLIES 4
WarrenBelz
Super User III
Super User III

Hi @Jakedawson ,

The issue is that created is a date and time whereas the date picker is a date only at 0:00.

The problem is the end date as everything created on that date will be after the date chosen in the date picker, so you need to add an extra day.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

View solution in original post

Jakedawson
Regular Visitor

I think it may be some time to do with a timezone issue if I look at the date in the table preview in power apps the dates are not the same as they are on the SharePoint list. Any idea how to fix that?

Hi @Jakedawson ,

Your SharePoint site needs to be on the same time zone as the PC running Power Apps or you may need to look at the TimeZoneOffset function.

 

Please click Accept as solution if my post helped you solve your issue. This will help others find it more readily. It also closes the item. If the content was useful in other ways, please consider giving it Thumbs Up.

ahh ok cool I will have a look at those and ill let you know thanks for the advice

Helpful resources

Announcements
PA User Group

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

secondImage

Demo Extravaganza is Back!

We are excited to announce that Demo Extravaganza for 2021 has started!

MBAS on Demand

Microsoft Business Applications Summit sessions

On-demand access to all the great content presented by the product teams and community members! #MSBizAppsSummit #CommunityRocks

Power Apps June 2021

June Power Apps Community Call

Don't miss the call this month on June 16th - 8a PDT

Top Solution Authors
Top Kudoed Authors
Users online (45,488)