Count Records where Today() falls within Start and End Dates - InfoPath Dev
in

InfoPath Dev

Count Records where Today() falls within Start and End Dates

Last post 09-01-2016 11:38 AM by jpl18lal22. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 09-01-2016 11:38 AM

    Count Records where Today() falls within Start and End Dates

    I am trying to count the number of records that have a Start and End Date that fall within today. I realized an issue where if the Start Date is the same as the today value, it won't count the record. The Start and End Date are coming from a data connection to a SharePoint list, so I believe it has something to do with the formatting of the dates.

    count(ID[StartDate <= today() and EndDate >= today()]) 

    Example Data. (Count should be 3, but when I do it, I get 1 because it isn't counting Records 1 and 3)

    Today's Date: 2016-09-01

    ID       StartDate      EndDate

    1        9/1/2016         9/4/2016

    2        8/29/2016       9/7/2016

    3        9/1/2016         9/1/2016

    I even tried to simplify it so that I was just trying to get the count of Start Date that equal Today's date, but this returns 0.

    count(ID[StartDate = today()])

    Is there a way to format the dates the same, so my numbers are accurate?

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.