Power Apps Date Time Math - Do calculations for payroll and timesheets

  Рет қаралды 33,440

Shane Young

Shane Young

Күн бұрын

Пікірлер: 85
@fidomcvitie9418
@fidomcvitie9418 3 жыл бұрын
I really like the way you do everything the long way (which is how us noobies think) and then show us how to cut it down to make it more usable. Awesome stuff.
@ShanesCows
@ShanesCows 3 жыл бұрын
Thanks. I try my best to make the content approachable.
@annadewitt123
@annadewitt123 3 жыл бұрын
This week I got a project about calculating the days off. I was worrying about how to calculate dates properly, so the video is spot on :D
@ShanesCows
@ShanesCows 3 жыл бұрын
I was looking out for you Anna. 😀
@jessefavela3694
@jessefavela3694 Жыл бұрын
Hi Shane, Long time fan / student. You've made some great content that's helped me and others. You're the best. Just wanted to leave a comment since this is an older/less visible video, but it's a video that I wish I saw sooner. I hope more newbies find this video. Also a fan of your IsMatch video lately too. Take care!
@torgeirkind23
@torgeirkind23 3 жыл бұрын
Hi Shane. You are a legend. Hot tip: I like to use Switch statements with a true condition. As such hoursBetween + Switch(true, minutesBetween > 52, 1, minutesBetween > 37, 0.75, minutesBetween > 22, 0.5, minutesBetween > 7, 0.25, 0)
@ShanesCows
@ShanesCows 3 жыл бұрын
Interesting 🤔
@felipecandido4846
@felipecandido4846 3 жыл бұрын
Great video, Shane. I used to use rounddown function to get the amount of weeks. So, without using WITH function, my formula is RoundDown(DateDiff(DatePicker1.SelectedDate, DatePicker2.SelectedDate) / 7, 0) & " weeks and " & Mod(DateDiff(DatePicker1.SelectedDate, DatePicker2.SelectedDate) , 7) & " days" Anyway, it is a great video. I'm learning a lot of thing with your videos.
@ShanesCows
@ShanesCows 3 жыл бұрын
Good stuff! There is always so many ways to do these things. 🐶
@nailpolished11
@nailpolished11 2 жыл бұрын
Thank you so much for this! You have no idea how much it helps! I’ve been trying to create a timesheet form that captures start and end time with calculated duration, this could very well work! Thank you again!
@xuyennguyen7110
@xuyennguyen7110 3 жыл бұрын
Another great video as always! Can't thank you enough.
@ShanesCows
@ShanesCows 3 жыл бұрын
You are welcome 🙏
@marypaulin.s4874
@marypaulin.s4874 3 жыл бұрын
Hi Shane thanks for the video ... just struggling to calculate between 4:00 PM and 12 :00 AM i have applied your formula but getting as -16 Hour 0 Minutes am i doing some thing wrong on the formula ... Thanks "Total : "&" "&With({Minutsbetween: DateDiff (TimeValue(Dropdown1.Selected.Value &":"&Dropdown3.Selected.Value &" "&Dropdown2.Selected.Value), TimeValue(Dropdown1_1.Selected.Value &":"&Dropdown2_1.Selected.Value&" "&Dropdown2_5.Selected.Value),Minutes)}, With({Minutsleftover:Mod(Minutsbetween,60)}, (Minutsbetween-Minutsleftover)/60&" "&"Hour"&" "&Minutsleftover&" "&"Minutes"))
@devangshah4546
@devangshah4546 3 жыл бұрын
Hii Shane, you always come up with awesome ideas & solutions for our troubles in Power Apps. It's my request to you that can you please create one video tutorial on connecting and operate our home accessories with power apps.
@ShanesCows
@ShanesCows 3 жыл бұрын
That does sound fun. :) I need to.
@ashokpershad
@ashokpershad 3 жыл бұрын
Awesome video Shane...thanks a lot
@ShanesCows
@ShanesCows 3 жыл бұрын
My pleasure!
@DutchNorthAtlanticAlliance
@DutchNorthAtlanticAlliance Жыл бұрын
Shane, 60/4=15 and 60/8=7.5 just to be completely exact; instead of 7 min. Just had to say it, since I study research science mathematics. Anyway love the video, much thanks!!!
@ShanesCows
@ShanesCows Жыл бұрын
Thanks! 😎
@mtamitolanga
@mtamitolanga 3 жыл бұрын
Thank you very much for the video. Can you please share datediff excluding weekend and holidays.
@ShanesCows
@ShanesCows 3 жыл бұрын
I haven't done that one before because then holidays make it hard. 😑
@pavelbenev3607
@pavelbenev3607 3 жыл бұрын
Hi Shane, another great video! Do you think you can do a video how to calculate Business days/hours (extracting weekends and off-work hours).
@ShanesCows
@ShanesCows 3 жыл бұрын
Maybe at some point but it is the same math as here. Just more calculations
@danielnelson9289
@danielnelson9289 3 жыл бұрын
I agree this would be wildly helpful. Excel had NETWORKDAYS formula. Powerapps needs this.
@rochellenicholson6372
@rochellenicholson6372 3 жыл бұрын
Hey Shane, love your videos. All this date and time stuff is hard work. But learning all the time thanks. When you do your videos can you also show how to have dates show as dd/mm/yy for us on the other side of the world, thanks in advance it would be much appreciated.
@ShanesCows
@ShanesCows 3 жыл бұрын
Text(Today(), "dd/mm/yyyy") in a label should do it. 😀
@rochellenicholson6372
@rochellenicholson6372 3 жыл бұрын
@@ShanesCows thanks, I understand that. But can you make a dropdown display dd/mm/yy after selection? Or am I missing something here.
@fadiahdab
@fadiahdab 3 жыл бұрын
Thanks, Shane as always, great video great motivation,I would like to ask for networkdays like excel to exclude the weekends
@ShanesCows
@ShanesCows 3 жыл бұрын
The challenge is then you also have to exclude holidays. It gets tricky fast.
@SebasTupac
@SebasTupac 2 жыл бұрын
@@ShanesCows a video about datediff excluding holidays and weekends would be awesome 😵
@JaffarSath
@JaffarSath Жыл бұрын
Hi, I love your videos on Power apps. I need a suggestion. I need to calculate the difference between current time and show it in a text box / label. I used the below formula in the Text property of the Text Label Minute(now()) - Minute(ProdTime) where the ProdTime is a variable which holds a time. When I update this formula, it gives me the hour difference between these two time (lets say 15 minutes). But the challenge is it is dynamic meaning when it past another minute, the text label still shows 15 minutes and doesn't change to 16. How to achieve this?
@sandiphore21
@sandiphore21 3 жыл бұрын
Thanks Shane. Really helpfull. How do I handle date serial number from excel as input in date picker powerapps. Any guide will be really helpful.
@ShanesCows
@ShanesCows 3 жыл бұрын
I have never done it in Power Apps only flow. You have to convert ticks. I think I showed it in this video. kzbin.info/www/bejne/h5S6m3SqbLaJpJY
@RyanSmith-mh1lj
@RyanSmith-mh1lj 2 жыл бұрын
Hey Shane, great video. How to add two days' working hours? For example, 8.5 and 8.5 in the PowerApps in the Total hours worked column? Appreciate it.
@ShanesCows
@ShanesCows 2 жыл бұрын
DateAdd function lets you add Hours by setting the 3rd input. But I don't think that is what you are asking?
@RyanSmith-mh1lj
@RyanSmith-mh1lj 2 жыл бұрын
@@ShanesCows , thank you for the reply, I just want to add 5 working days total hours worked, so I should have another column where I can add my time worked, thank you
@chetan2635
@chetan2635 2 жыл бұрын
Hi Shane, great video! Do u know if there is a way to show how many weekends falls between start and end date ?
@micamack
@micamack 3 жыл бұрын
Hey Shane - how would you 'add' two timestamps together? For example, and to play into the 'payroll' example in this video.... If someone is paid hourly, how do you add all their hours/minutes up to then pay them their hourly rate over say a week or 2 pay cycle?
@JoseRomero-ss3zv
@JoseRomero-ss3zv 3 жыл бұрын
How to use the 360 ​​days function in powerapps?
@donjultchi-ngoma751
@donjultchi-ngoma751 Жыл бұрын
Hello! How to find the number of hours worked by employee ABCD knowing that we have a table that looks like this: Employee || Date ||Start time ||End time ****************** ABCD || 01/01/2022 || 08:00 || 11:01 ABCD || 01/01/2022 || 12:05 || 15:00 ABCD || 01/01/2022 || 15:55 || 18:16 Please help me.
@hoowie100
@hoowie100 3 жыл бұрын
Nice videos! Do u know if there is a way to show calculated days between start and end date over months? So u could see in a gallery or graph how many days u have worked or is excepted to work for each month during year?
@ShanesCows
@ShanesCows 3 жыл бұрын
I haven't done exactly that before but I think all of the pieces to solve it are in this video. DateDiff and Mod, you just may have to get creative.
@ironkaicer
@ironkaicer 3 жыл бұрын
Hi Shane, its a great video, but for example I am calculating extra hours for my employees, they submit the report and for example my employee reports that its extra hour began at 23:00 and finisih at 0145 of the next day, if I use this method its shows me a negative value, is there any way to make that kind of calculation? That if the hour its of the next day show me that difference
@ShanesCows
@ShanesCows 3 жыл бұрын
You need to add a date into the mix and set the logic to increment the date. With a little wiggle should be possible
@MrKukulcan78
@MrKukulcan78 2 жыл бұрын
Hi Cesar, did you fix the problem?
@johnsengers98
@johnsengers98 Жыл бұрын
How can this problem be solved? I am dealing with summing times between 8:00 PM and next day 03:00 AM. What should I change in the code to see 7:00 hours in a textbox?
@f.k.b.16
@f.k.b.16 Жыл бұрын
@@johnsengers98 Did anyone figure this out? I used a similar method but one thing I just noticed was if the user clocks in at 6:00 PM and out at 2:00 AM it is showing me they worked 16 hours instead of 8...
@johnsengers98
@johnsengers98 Жыл бұрын
@@f.k.b.16 Add a datepicker as Enddate. In Text: Set(EndDate, name datepicker.SelectedDate. In another Textbox of Label put the same formule as written in this video. Example: With({minutesbetween:DateDiff(DateAdd(StartDate,StartHours,Hours),StartMinutes,Minutes),DateAdd(DateAdd(EndDate,Endhours,Hours),EndMinutes,Minutes)Minutes)}, With({minutesleftover:Mod(minutesbetween,60)}, (minutesbetween - minutesleftover)/60 & “:” & Text(minutesleftover,”[$-en-US]00”) & |” Hours” )) This would help you to sum the difference between Starttime and Endtime over 24 Hours.
@vjdiorio
@vjdiorio 3 жыл бұрын
This is awesome! I am 90% there. WHAT IF ..... start date=today end date=7 days in the future. S.Hour=8 E.Hour=7. We know there are 7 days difference, but how do I calculate if the ending time is less than the starting time. in this case the answer is -1. How do I calculate 6 days and 23 hours?
@ShanesCows
@ShanesCows 3 жыл бұрын
Maybe count the difference on hours. Then turn the hours total into days and hours as appropriate
@vjdiorio
@vjdiorio 3 жыл бұрын
@@ShanesCows I'll give it a go tomorrow. Having trouble with the math. 🙄 Thank you for the advice
@rennanlima4647
@rennanlima4647 3 жыл бұрын
Master, give a class on calculating hours between different data. PLEASE! Save fear.
@ShanesCows
@ShanesCows 3 жыл бұрын
Did you see this one?kzbin.info/www/bejne/e5O8foFqpNqCrLM
@rennanlima4647
@rennanlima4647 3 жыл бұрын
@@ShanesCows yes, but I couldn't understand it well, because of the "AM" and "PM" fields to differentiate. I would like to learn how to perform the calculation using only two inputs, with the condition to calculate the hours in the PM-AM period. for example: The activity starts at 22:00h 08/10/2021 and ends at 05:00h 08/11/2021. expected result 07:00h. thanks for replying fast.😁👍🏼
@Mrs_Boda
@Mrs_Boda 3 жыл бұрын
Hello Shane, if my end date is less than start date, m able to popup message, but unable do this for date & time together, have any solution.??
@devadharshinir9195
@devadharshinir9195 6 ай бұрын
Hello sir, big fan from India. I have an issue with summing hours and minutes from TextInput in the Galley and display the total hours and minutes in Label which is outside of the gallery. I have weekly timesheet entry, there I have 7 inputs in a row as Sundayhour to Saturdayhour. If I wish I can add rows with same Sundayhour to Saturdayhour text inputs. I want to display the total hours of each day
@gestionnairesage2558
@gestionnairesage2558 2 жыл бұрын
How can I return all fridays between two dates ?
@carcrash1875
@carcrash1875 3 жыл бұрын
Hi, how do I clear the list of commands given from Run?
@ShanesCows
@ShanesCows 3 жыл бұрын
Not sure I follow.
@carcrash1875
@carcrash1875 3 жыл бұрын
@@ShanesCows Sorry for my bad English. In this image: prnt.sc/xaw9rs In the Run window, when I click the drop down menu (the red arrow), a list of old commands that I issued in the past appears (the red rectangle). How do I clear the list, so when I click the drop down button (arrow), no command appears? Thank you!
@franknielsen3219
@franknielsen3219 3 жыл бұрын
At the end of the rainbow, there is a jar of gold.................... or Shane Young :)
@ShanesCows
@ShanesCows 3 жыл бұрын
Thanks Frank! 🐶
@samiraslan9735
@samiraslan9735 3 жыл бұрын
Hello Shane, I just built my first fully working app and big part of it was because of you, now I just found out that you can only share it with people in our organization!!! is this right ? is there a way to add my app in our company website so people from uses it ?
@ShanesCows
@ShanesCows 3 жыл бұрын
Hey Sami that is correct. YOu cannot embed a Power APps app. YOu have to run it directly in a browser or the Power Apps app. And everyone needs to authenticate with the app and have a license.
@lindakeefe6920
@lindakeefe6920 3 жыл бұрын
Great video, Shane! I've watched it a few times 😂 along with the other Date & Time and the calendar ones. I feel like I'm kind of close but I am trying to figure out the output for a date entered with a date picker, the output must be the second Tuesday of the month, and if that has passed it moves to the next month. I've used DateAdd and Weekday functions together and apart, and I know I"m on the right track just can't seem to get it. Any tips?
@louiscutmore
@louiscutmore 3 жыл бұрын
Shane, may I ask, why did you use "with" instead of "set" or something else to set a variable? Love those live troubleshooting moments! Again, awesome stuff! love those formulas!
@ShanesCows
@ShanesCows 3 жыл бұрын
With can be used in a label. Set cannot be. Bit with is only available in that one context.
@louiscutmore
@louiscutmore 3 жыл бұрын
@@ShanesCows Got it 👍 Thanks!
@shubhamsatpathy6489
@shubhamsatpathy6489 3 жыл бұрын
Can I restrict calender in terms of days like +30 , -30 days can be selected from today's days.
@ShanesCows
@ShanesCows 3 жыл бұрын
Nope, you will have to let them pick any date and then validate it falls in your range.
@shubhamsatpathy6489
@shubhamsatpathy6489 3 жыл бұрын
@@ShanesCows any function to validate range .
@ShanesCows
@ShanesCows 3 жыл бұрын
Talked about it a bit in the video. Or maybe this will help kzbin.info/www/bejne/qWmYmmuLjNxlh68
@felipecandido4846
@felipecandido4846 3 жыл бұрын
You can't restrict that but you can don't allow go ahead with a date without your range using conditional in your submit button (or anything else like that).
@TheToni2123
@TheToni2123 3 жыл бұрын
thx shane
@ShanesCows
@ShanesCows 3 жыл бұрын
You are welcome 🙏
@alexotoous
@alexotoous Жыл бұрын
how do you save this in dataverse colums
@salmanb3655
@salmanb3655 2 жыл бұрын
How to calculate the month difference between a date range
@ShanesCows
@ShanesCows 2 жыл бұрын
DateDiff will do months. 😎
@timtooley8993
@timtooley8993 3 жыл бұрын
I was testing and noticed a rare event of a 4 week month. Feb 2026. So the last week of the month view is all the next month.
@garrettnixie
@garrettnixie Жыл бұрын
18:34
@stayalive1017
@stayalive1017 2 жыл бұрын
Great video. Though is giving me + 1 hour every 12 and 24 hours
@shawkeme
@shawkeme 2 жыл бұрын
need to calculate half day
QTT - Power Apps Excel is a terrible data source
10:48
Shane Young
Рет қаралды 43 М.
Power Apps Time zones, UTC, SharePoint, and Excel
28:45
Shane Young
Рет қаралды 35 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 12 МЛН
The evil clown plays a prank on the angel
00:39
超人夫妇
Рет қаралды 44 МЛН
Accompanying my daughter to practice dance is so annoying #funny #cute#comedy
00:17
Funny daughter's daily life
Рет қаралды 28 МЛН
Интересно, какой он был в молодости
01:00
БЕЗУМНЫЙ СПОРТ
Рет қаралды 3,6 МЛН
PowerApps Calendar Control - Build your own using Galleries
35:02
Power Apps Date Calculations for Business Days
17:47
Reza Dorrani
Рет қаралды 44 М.
LAVROV's interview with Tucker CARLSON 😁 [Parody]
8:34
Юрий ВЕЛИКИЙ
Рет қаралды 314 М.
Power Apps Shopping Cart new for 2021
41:28
Shane Young
Рет қаралды 99 М.
PowerApps - Add an "All" to your Dropdown Lists - Dynamically!
18:17
Patch vs Update vs UpdateIf in PowerApps (which one to use)
15:33
Alireza Aliabadi
Рет қаралды 28 М.
Intro to PowerApps Variables
19:23
Shane Young
Рет қаралды 206 М.
Start using these 7 Power Apps Formulas (Power Fx)
22:57
Reza Dorrani
Рет қаралды 76 М.
VIP ACCESS
00:47
Natan por Aí
Рет қаралды 12 МЛН