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

Announcements

News and Announcements icon
Community site session details

Community site session details

Session Id :
Power Platform Community / Forums / Power Apps / Help with dates and ti...
Power Apps
Answered

Help with dates and times differences

(0) ShareShare
ReportReport
Posted on by 46

Hi All, hoping some genius can help me see a way to acheive this -

 

I'm building an Equipment Request PowerApp (for things like iPads etc) so staff can request an item, and we can keep track of it.

 

I can easily book the item out, but what I can't seem to do is then stop someone else creating another request for the same item at the same time.

 

Any ideas?

 

I've tried adding a gallery with all the existing bookings, and then filtering by item, start date/time, end date/time, and then using CountRows to return an error if anything is 'found' - this only work if the times are the same, or fall within the start / end times. It doesn't 'find' the existing booking if the new start date/time is BEFORE the existing start date/time, and the new end date/time is AFTER the existing booking end date/time (sorry if i'm not making that very clear). Maybe someone can help me out with this method?

 

Alternatively, is there a way of getting a unique list of values (minutes) between two dates/times? If I can do that, then I can do a simple comparison between the existing list, and the 'new' list for any matches.

 

Or alternatively again - does anyone have a completely different way to acheive this? Happy to try different methods!!!

 

Thank you all in advance.

Categories:
I have the same question (0)
  • Pstork1 Profile Picture
    69,657 Most Valuable Professional on at

    Is there a check in process when a user brings it back?  Maybe just add a field to the equipment record for Checked Out.  The only problem I see is making sure to uncheck it when its returned.

  • Verified answer
    Brammers Profile Picture
    46 on at

    Hi, there will be a check in / out process as part of the app, but this issue is to do with stopping multiple bookings.

     

    I've been playing around for an hour, and I think i've cracked it too.... Yay!

     

    I've continued with the filtered Gallery method, and using the following 'rules' - it seems to work as I expected!

     

    Filter(
    Sort(
    'IT RequestsV2',
    Code,
    Ascending
    ),
    CodeN1_Value.Text = Code && (('Start Date TimeN1'.Update >= 'Start Date Time' && 'Start Date TimeN1'.Update <= 'End Date Time') || ('End Date TimeN1'.Update >= 'Start Date Time' && 'End Date TimeN1'.Update <= 'End Date Time') || ('Start Date TimeN1'.Update <= 'Start Date Time' && 'End Date TimeN1'.Update >= 'End Date Time'))
    )

  • Pstork1 Profile Picture
    69,657 Most Valuable Professional on at

    Glad you found your answer.

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

Season of Sharing Community Challenge Winners!

Congratulations to our community stars!

Kudos to our 2025 Community Spotlight Honorees

Expanding mentorship, skilling, and AI innovation

Congratulations to the July Top 10 Community Leaders!

These are the community rock stars!

Leaderboard > Power Apps

#1
WarrenBelz Profile Picture

WarrenBelz 358 Most Valuable Professional

#2
11manish Profile Picture

11manish 214 Super User 2026 Season 2

#3
Mohsin Ali Profile Picture

Mohsin Ali 185

Last 30 days Overall leaderboard