cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
macuser1987
Level: Powered On

Between Times Function

Hi Everyone,

 

Looking to figure out how to do a between function with Times 

 

Currently i have a date field where i basically want to grab anything between 7:00 AM and 7:59 AM

 

I have currently AND(Text(Date,"[$-en-us]hh:mm AM/PM")>= "07:00 AM", AND(Text(Date,"[$-en-us]hh:mm AM/PM") <= "07:59 AM")

 

Any help with this is greatly appreciated. 

 

Dave

5 REPLIES 5
Sienna
Level 10

Re: Between Times Function

I’m not sure what did you mean by grabing... If you want to filter database which has time column between these times then use
Filter(databaseName,timeColumn>TimeValue(“7:00AM”) && timeColumn<TimeValue(“8:00AM”))
If that column has date in it the you have to use DateTimeValue istead. If your column isn’t formated correcty then you have to convert the column with TimeValue() too
Highlighted
macuser1987
Level: Powered On

Re: Between Times Function

Hi Sienna,


Thanks for the response here is my current table 

 

Table({Time: LookUp('1526', And(Text(Date_Calendar_View.SelectedDate,"[$-en-us]m/dd/yyyy") = Text(Date,"[$-en-us]m/dd/yyyy"), Date >= DateTimeValue("07:00 AM") && Date <= DateTimeValue("07:59 AM")),Max(DateTimeValue(Date)))})

 

It is currently erroring out when trying to get the Max Time near the end of the table

 

Thanks,

 

Dave

Sienna
Level 10

Re: Between Times Function

Ok and what exactly are you trying to do with the max funtion? Please post here simplify example of a table (not your app table if possible) and what result you want to get and where you want to get it. That way I can point you to the right direction.
macuser1987
Level: Powered On

Re: Between Times Function

Hi Sienna,

 

Thank you for the response. I am trying to gather a count of how many items in a SharePoint list were created from 7am to 8am 

 

I want to display the latest time that an item was created between 7 am and 8 am.

 

Any help with this would be greatly appreciated. 

Sienna
Level 10

Re: Between Times Function

in that case try something like this

 

Filter(TableName, TimeValue(timeColumn)= Max(Filter(TableName,TimeValue(timeColumn)>TimeValue("7:00AM") && TimeValue(timeColumn)<TimeValue("8:00AM")), TimeValue(timeColumn)))

Helpful resources

Announcements
firstImage

Microsoft Business Applications Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

firstImage

Watch Sessions On Demand!

Continue your learning in our online communities.

Power Platform 2019 release wave 2 plan

Power Platform 2019 release wave 2 plan

Features releasing from October 2019 through March 2020

FirstImage

Power Platform World Tour

Coming to a city near you

thirdimage

PowerApps Community User Group Member Badge

Fill out a quick form to claim your user group badge now!

FourthImage

Join PowerApps User Group!!

Connect, share, and learn with your peers year-round

Top Kudoed Authors
Users Online
Currently online: 422 members 3,818 guests
Please welcome our newest community members: