cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
sbgoh
Post Patron
Post Patron

Count rows with a day

Hi,

 

I wish to countrows of a Sharepoint list with one day i.e. Now() 00:00:00 to Now() 23:59:59. However I am unable to get the formula correct. The field I am checking against is a sharepoint datetime field. Any advise?

 

CountRows(
Filter(
SP_LIST,
'Issue Date' >= DateTimeValue(Now(), "dd/mm/yyyy 00:00:00.fff"),
'Issue Date' <= DateTimeValue(Now(), "dd/mm/yyyy 23:59:59.fff")
)

1 ACCEPTED SOLUTION

Accepted Solutions
UdayAdhikari
Continued Contributor
Continued Contributor

@sbgoh - please give this a try. By default, DateDiff function uses "Days" to compare between 2 dates so it ignores times.

 

CountRows(
    Filter(
        SP_LIST,
        DateDiff(
            'Issue Date',
            Today()
        ) = 0
    )
)

 

Thanks

 

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

2 REPLIES 2
UdayAdhikari
Continued Contributor
Continued Contributor

@sbgoh - please give this a try. By default, DateDiff function uses "Days" to compare between 2 dates so it ignores times.

 

CountRows(
    Filter(
        SP_LIST,
        DateDiff(
            'Issue Date',
            Today()
        ) = 0
    )
)

 

Thanks

 

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.

It works. Thank you!

Helpful resources

Announcements
Power Platform Conf 2022 768x460.jpg

Join us for Microsoft Power Platform Conference

The first Microsoft-sponsored Power Platform Conference is coming in September. 100+ speakers, 150+ sessions, and what's new and next for Power Platform.

365 EduCon 768x460.png

Microsoft 365 EduCon

Join us for two optional days of workshops and a 3-day conference, you can choose from over 130 sessions in multiple tracks and 25 workshops.

Users online (3,624)