Excel Formula for Time Elapsed in Days, Hours and Minutes

Sdílet
Vložit
  • čas přidán 7. 09. 2024

Komentáře • 218

  • @tonyhaber3077
    @tonyhaber3077 Před 2 lety +1

    This is the best video I have watched for Time calculations in Days & Hours. Thanks a lot.

  • @sandeepjaiswal6388
    @sandeepjaiswal6388 Před rokem +1

    Sir your education is like a burning lamp. Who shows the right path. We are very happy with you.

    • @Computergaga
      @Computergaga  Před rokem

      That is beautiful, Sandeep. Thank you 😊

  • @cixmogarcia582
    @cixmogarcia582 Před 4 lety +34

    =INT(B2-A2)&" Days"&Hour(MOD(B2-A2,1))&" Hours "&MINUTE(MOD(B2-A2,1))&" minutes"

    • @nawazshaikh6081
      @nawazshaikh6081 Před 3 lety +1

      what will be the formula if I want to exclude the weekend? Please help..

    • @Computergaga
      @Computergaga  Před 3 lety

      You would use NETWORKDAYS or NETWORKDAYS.INTL instead of B2-A2.

    • @rahultomar8546
      @rahultomar8546 Před 3 lety +1

      @@Computergaga Hello Sir please type Full formula with exclude weekend and I want result in days Hour minutes

    • @francenewhyte6016
      @francenewhyte6016 Před 2 lety

      Good Day. How can I show days only. So for example I only want to reflect full days.

    • @j.rjunior5584
      @j.rjunior5584 Před rokem

      Or you can also use this formula as well, it's very similar. But if there's no data in it it'll show blank.
      =If(B2="","",INT(B2-A2)&" Days "&TEXT(B2-A2, "h""hrs""m""mins"""))
      The format in the text you can change it to whatever you wanna see.

  • @akhmadmingboev5954
    @akhmadmingboev5954 Před rokem

    I never comment on videos but this was just great and helped me resolve my issue. Thanks 🙏

  • @Kitana68
    @Kitana68 Před rokem

    Good Job Explaining. Finally got it after adjusting the cell formatting!

  • @dhavalmistry9901
    @dhavalmistry9901 Před 4 lety

    Respected sir,
    I m Dhaval from india. Finding this kind of formula. This is a wonderful. Just complete solution. Love know more & more. Thank you very much And respecte. Manaskara.

  • @user-xb1wh2go3l
    @user-xb1wh2go3l Před 2 lety +1

    Thanks alot for the teaching sir... It's very helpful

  • @sandeepjaiswal6388
    @sandeepjaiswal6388 Před rokem

    Thank you sir. You are best a best teacher I am very happy .may you live long.

  • @sekarukl
    @sekarukl Před měsícem

    Thanks for detailed explanation can you please help to How to calculate average of the difference data generated?

    • @Computergaga
      @Computergaga  Před měsícem

      You're welcome.
      For that, we would need a column instead or in addition to this one, with the difference as a numeric value. We cannot average the results from this video as they are a text string.
      A simple subtraction such as B2-A2 would achieve this, though if dates and times are in different columns, they need to be combined first.
      Then you can average the results of the column.

  • @leannNarcher
    @leannNarcher Před 2 lety +2

    is it possible to incorporate =IF(A2

  • @erimwolf7285
    @erimwolf7285 Před 5 lety +7

    Thanks you for your very informative video! But I do have a question, how would you add all of your differences together afterwards?

    • @MuddyBuddy685
      @MuddyBuddy685 Před 3 lety

      Did you ever figure out how to add them all up?

    • @erimwolf7285
      @erimwolf7285 Před 3 lety

      @@MuddyBuddy685 unfortunately, no

    • @MuddyBuddy685
      @MuddyBuddy685 Před 3 lety

      Erim Wolf what did you end up doing with your worksheet? I know it was a year ago but I’m hoping for som help

    • @erimwolf7285
      @erimwolf7285 Před 3 lety

      ​@@MuddyBuddy685 I did actually! you add up the rows containing your dates instead of the new totals you acquired in your row.
      for example: =INT((SUM(B2:B3))-(SUM(A2:A3)))&"days"&HOUR(MOD((SUM(B2:B3))-(SUM(A2:A3)),1))&"hours"&MINUTE(MOD((SUM(B2:B3))-(SUM(A2:A3)),1))&"minutes"
      (I input those specific numbers to go with the video so you have a visual, but replace the number with whatever you have) :)

    • @MuddyBuddy685
      @MuddyBuddy685 Před 3 lety +1

      @@erimwolf7285 Great! Thank you so much!

  • @user-nc2or9xu2h
    @user-nc2or9xu2h Před měsícem

    great video thanks for sharing it

  • @PinkyPurpleGalaxy
    @PinkyPurpleGalaxy Před 5 měsíci

    Thank you so much

  • @Daily-Life-24
    @Daily-Life-24 Před 9 měsíci

    Thank You

  • @JamieScott77
    @JamieScott77 Před 5 měsíci

    Thanks for sharing this forumal. Complex but I learnt a lot. Now.... What if we want to show the result in WORKING DAYS (Mon-Fri) and TIMES (9-5PM)

  • @aydinhami
    @aydinhami Před 9 měsíci

    Excellent and very informative video!

  • @tangocharlee786007
    @tangocharlee786007 Před 4 lety

    Very Informative and Easy to Understand

  • @sizwemchunu6110
    @sizwemchunu6110 Před 3 lety +2

    Thank you for this Tutorial really helpful. I don't want to include hours after shift (22:00 - 07:00). how do I factor the 9 hours out?

  • @danieladebayo6714
    @danieladebayo6714 Před 8 měsíci

    Good job.

  • @emperorofup
    @emperorofup Před 4 měsíci

    THANKS BUDDY, THIS ONE IS SAFE MY JOB😅😅😅

  • @carlosalfonso7504
    @carlosalfonso7504 Před 6 lety +2

    Very important & useful lesson once again, thank you so much!

  • @ondee2234
    @ondee2234 Před 11 měsíci

    Thanks. Was very helpful!

  • @jackychawla5422
    @jackychawla5422 Před 7 lety +2

    so elegant sir

  • @GM-hj8se
    @GM-hj8se Před 6 lety +2

    Brilliant! Thank you!!

  • @nawazshaikh6081
    @nawazshaikh6081 Před 3 lety

    @Computergaga Thanks for sharing this. what will be the formula if I want to exclude the weekend? Please help..

  • @mydigitalspace13
    @mydigitalspace13 Před rokem

    Thank you so much for this. Really helpful

  • @ericraya6890
    @ericraya6890 Před rokem

    Help me a lot!

  • @nopphapadolj.2397
    @nopphapadolj.2397 Před rokem

    Very helpful , Thanks

  • @obi76ad
    @obi76ad Před 3 lety

    Nice one! Life saver. Found this video 10 minutes before my meeting and quickly updated my spreadsheet! Liked!
    Is there a way to hide the value if it is zero because the date and time values have not been entered yet?

    • @Computergaga
      @Computergaga  Před 2 lety +1

      Sure. We can do this in the formatting of the cells. Difficult to explain in the comment, but zero values are the third element in custom formatting. If you ignore it, it will display as nothing.
      We could also wrap and IF around this to achieve it.

  • @pradeepvishwakarma9831

    Thanks for the tutorial..

  • @jlopez327
    @jlopez327 Před 8 měsíci

    Wow you are amazing

  • @dianagoncalves5665
    @dianagoncalves5665 Před 7 lety +6

    hi, How to sum up days, hours and minutes?

  • @hammadarain2725
    @hammadarain2725 Před 3 lety

    Good job done you Sir, too much helpful you video sir........

  • @thebesttechnical3608
    @thebesttechnical3608 Před 5 lety

    Great and easy way of explaining the
    topic, thank you very much.

  • @jahskido06
    @jahskido06 Před 3 lety

    Thankyou, this helped me out!

  • @humashoeb280
    @humashoeb280 Před 5 lety +1

    Great video, how would I calculate time lapsed between two date/time values based on a working day , for example calculating the difference between core working hours say 8.30am-5.00pm

    • @Computergaga
      @Computergaga  Před 5 lety

      Thank you Huma. I have a video here - czcams.com/video/3bUVySH5prQ/video.html that explains this and more. It is a timesheet spreadsheet based on different work hours and days.

  • @lynrun7375
    @lynrun7375 Před 2 lety

    Thanks ur such a big help ☺️

  • @girivv7336
    @girivv7336 Před 5 lety +1

    Awesome!!! you saved my day...

  • @mickqwerty1967
    @mickqwerty1967 Před rokem

    Hi, Great video....is there an easy way to show days hrs and mins from the calculation in separate cells?

    • @Computergaga
      @Computergaga  Před rokem

      Sure. Instead of combining the results, you can write separate formulas for each cell/column.

  • @jungvelybusydog
    @jungvelybusydog Před 3 lety

    This is really helpful

  • @ciimaofficial7252
    @ciimaofficial7252 Před 4 lety

    Hi Computer Gaga, I have been looking for this formula for days! I am so glad I found your chanel, I have subscribed and currently on your playlist.
    My question for this tutorial is, can the formula work if the difference between A and B is in hours e.g 3 hours and when the time in B increases,it displays 3 days, 3 hours?

    • @Computergaga
      @Computergaga  Před 4 lety

      Thank you. Sure. We could wrap the formula in a conditional function so that if the value is over a day then show days, otherwise just the hours.

    • @dwk1986
      @dwk1986 Před 3 lety +1

      @@Computergaga can you actuall show how to do this? as well as showing how to average these types of datas?

  • @muhammadrizwan7897
    @muhammadrizwan7897 Před rokem

    HI, is it possible to calculate the next date and time with counting 8 hrs per day.

  • @valcharles-pierre5684
    @valcharles-pierre5684 Před 4 lety +1

    How would you be able to get the average duration for multiple entries using your format?

    • @Computergaga
      @Computergaga  Před 4 lety

      This technique provides an answer formatted as text so the average is not possible. You would need a different technique to calculate the time elapsed.

  • @knowledgebyte
    @knowledgebyte Před 5 lety

    Good work. I managed to adapt that into a calculated column and it works a treat. I wonder what the DAX equivalent of that in the data modeler is, in Power pivot?

    • @Computergaga
      @Computergaga  Před 5 lety

      Something I have not tried. But I am sure the equivalent is possible there. Lots to explore in DAX.

  • @nournmonykosoma6614
    @nournmonykosoma6614 Před 3 lety +1

    Thank you dear but I have one more to clear, how to calculate the average of both difference day and time?

  • @WorldViralVideo4
    @WorldViralVideo4 Před 2 lety

    Thanks 👍

  • @JB_magic
    @JB_magic Před 4 lety +2

    How do you get the date and time to be displayed in a single cell?
    And can you edit that particular cell, i.e. can you enter "11/10/19 10:13:42" in another cell?

  • @raymarreyes2208
    @raymarreyes2208 Před 4 lety +1

    Ctrl+Shift+Alt+; Shortcut key works on that formula .

  • @MrSajeer100
    @MrSajeer100 Před 3 lety

    Thanks

  • @marcworley1
    @marcworley1 Před 4 lety

    Hi this is really useful. What changes would I have to make to the formula to display the time elapsed in hours?

    • @Computergaga
      @Computergaga  Před 4 lety

      Thank you, Marc. I have another video on techniques for this here - czcams.com/video/_Fg4gl4qvss/video.html

  • @mariacortina1000
    @mariacortina1000 Před 2 lety

    Well explained! Thanks - exactly what I needed!!

  • @j.rjunior5584
    @j.rjunior5584 Před rokem

    I have a question not related with the video.
    But is it possible too sum values from one cell but only have it updated to the current cell when that value is added in?
    Soo for example if I have a formula to calculate equity in all of row "A", and say the equity is at $200 in A18, and say I wanna add a deposit of $100 in column B1.
    Is it possible just to update the current column in A18, rather than suming the rest of the columns in "A1-A17."
    Soo column A18 would show $300, and the rest of the columns from A1-A17 values would stay the same?
    I have noo idea if you can or can't doo this in excel.
    I know for a fact tho, is if I match the same columns and rows in column A and B than it'll work perfectly. But just wondering if I can do it that way I mentioned above?

  • @ChopsB8X
    @ChopsB8X Před 2 lety

    Thanks for a great video! What do you mean in your other comments to swap b2-a2 with networkdays to remove weekends. So confused! 🥺

    • @Computergaga
      @Computergaga  Před 2 lety

      Thank you. B2-A2 returns all days between two dates. NETWORKDAYS is a function that returns only the working days. It allows you to specify the weekend days and any other additional non-working days such as holidays, illness, other projects etc. This function could be inserted instead if people wanted working days only.

  • @user-vw2ws2vh7t
    @user-vw2ws2vh7t Před rokem

    This is great but it isn’t working on my sheet 🙈 typed exactly like yours, same spaces and everything. Any advice? Could it be that my baby excel version is too old?

    • @Computergaga
      @Computergaga  Před rokem

      You version will be fine. This function is not new. I would check the formula again. There will be a difference. Do you receive a specific error? Are you based in Europe, as you may need ; instead of ,?

  • @sttank2192
    @sttank2192 Před 4 lety

    Sir, how would I be able to have the values be based on a 8 hour work day that would auto subtract from the days (I am applying it to employee accruals/used leave) Thanks

  • @jay55patel
    @jay55patel Před 4 lety

    great video thank you

  • @Burgyste
    @Burgyste Před 5 lety

    Well explained, thank you, keep up the good work!!

  • @vasiliskosmas1616
    @vasiliskosmas1616 Před 4 lety

    thanks a lot

  • @karishmaarora5498
    @karishmaarora5498 Před 3 lety

    This is excellent! Thank you so much.
    Can you please advise how to include the networkdays as well to this. It will be really helpful.

    • @Computergaga
      @Computergaga  Před 2 lety +1

      Thank you, Karishma. NETWORKDAYS would replace the B2-A2 calculation.

    • @ChopsB8X
      @ChopsB8X Před 2 lety

      @@Computergaga but how? Can you show the formula based on your video? Thank you 🙏

  • @dishantkumar8405
    @dishantkumar8405 Před 5 lety

    Thanku sir ,its very help full for me .

  • @crystalbell9608
    @crystalbell9608 Před 6 lety +1

    Thank You!!!!!

  • @vineshdamodaran9607
    @vineshdamodaran9607 Před 4 lety

    Perfect!! Thank you.

  • @Dexter101x
    @Dexter101x Před 5 lety +1

    Awesome

  • @TruthSeeker-3150
    @TruthSeeker-3150 Před 2 lety

    Once you get the Days, hours and minutes, is there any way to sun this elasped time? Thx

  • @dbernie57
    @dbernie57 Před 5 lety

    Hi, How do you Add in the ability to also measure Years and Months whilst still keeping all the information above? thanks

  • @ashutoshvarshney914
    @ashutoshvarshney914 Před rokem

    How to exclude Downtime or Non-working hours from two different dates & time while calculating Time Spent? Please help.

  • @jackychawla5422
    @jackychawla5422 Před 7 lety +1

    please upload some other advance videos on indirect function

  • @majidsiddique8227
    @majidsiddique8227 Před 5 lety

    Excellent

  • @bohdanjarema3786
    @bohdanjarema3786 Před 3 lety

    Hi, Is there a way to return the answer with leading zeros, say,- 3 days 9 hours 5 minutes as 3d 09h 05m (or 3:09:05:00 if you use colons (and include seconds if you prefer) instead of d,h,m,s)

  • @cars365official
    @cars365official Před 4 lety

    Brilliant !!!

  • @myarnie1950
    @myarnie1950 Před 2 lety

    works brilliantly but is there a way to have the result update automatically? thanks

    • @Computergaga
      @Computergaga  Před 2 lety +1

      Great! But the closest you can get to automatic is some VBA code to run on intervals.

  • @MrKanito016
    @MrKanito016 Před rokem

    How can you get average of the two to demonstrate day, hour and minutes

  • @TheZadc
    @TheZadc Před 3 lety +1

    I need help. How can i exclude Weekends ?

  • @samimsedeqey8231
    @samimsedeqey8231 Před rokem

    hello sir, when is use this formula days, hours ,and minutes shows but days are not showing as it appears on your screen. could please tell me how to solve and why?

  • @ItsMe-ic1gb
    @ItsMe-ic1gb Před 3 lety

    Is there a way to do this with CONCATENATE? Ex: A2 is 8/2/2021, B2 is 8:30 and A3 is 8/4/2021,B3 is 4:30. Once concatenated it joins the cells of A2 and B2 into C2 and A3 and B3 into C3. I've tried to do this but it comes out not looking right. is it impossible to separate the date and time?
    (sorry if it's a confusing question)

  • @KnowEverythin
    @KnowEverythin Před 4 lety

    If , i use different column like start date, start time, end date ,end time... What is the formula??

  • @samimsedeqey8231
    @samimsedeqey8231 Před rokem

    hello, sir when I apply this formula, hours and minutes are showing perfectly but day is not showing. it shows something weird? how solve this. and one more thing when adding zero before day and months when shifting to another cell the zero disappears how to solve this as well?

  • @jelveheskandari9586
    @jelveheskandari9586 Před 3 lety

    👏🏻👏🏻👍🏻👍🏻 was so helpful

  • @sotiriss.93
    @sotiriss.93 Před 3 lety

    I keep having problems with the mod function between the cells.Any help?

  • @zemtechnology4474
    @zemtechnology4474 Před 5 lety

    Nice information

  • @ibrahimsbarry4766
    @ibrahimsbarry4766 Před 5 lety +1

    great work

    • @Computergaga
      @Computergaga  Před 5 lety

      Thank you Ibrahim.

    • @ibrahimsbarry4766
      @ibrahimsbarry4766 Před 5 lety

      @@Computergaga I have a question...my Job includes calculating the arrival date and time of a vessel and the departure date and time..I should calculate number of days and time the vessel stay in port..but i find it very difficult...thanks

    • @Computergaga
      @Computergaga  Před 5 lety

      Did the video not work for you? What trouble are you having?

    • @ibrahimsbarry4766
      @ibrahimsbarry4766 Před 5 lety

      @@Computergaga yes it helps but you enter both the date and time on the same cell which i normally don't use. buh am checking you previous videos whether i will see the one that suites me.
      buh is great help thank

    • @Computergaga
      @Computergaga  Před 5 lety

      If it helps Ibrahim, you could create a 'helper column' of dae and time by adding the 2 cells you have together. And then use that helper column in the formula. This helper column can be hidden and created solely for the calculation.

  • @johngeselle5209
    @johngeselle5209 Před 2 lety

    Not what i was looking for. but that being said. you can make this mutch easier with a custum format. just make a format ["D"] : [H]:mm:ss

  • @samanthaspence7790
    @samanthaspence7790 Před rokem

    How can I calculate the elapsed time in days hrs and mins as just minutes

  • @hiteshchauhan645
    @hiteshchauhan645 Před 4 lety

    What is formula if calculate as per (8hrs)as working hrs?

  • @bazz3244
    @bazz3244 Před 4 lety

    What if in this example the end date is before the start date. It's for a planned and actual date and time for an event happening

    • @Computergaga
      @Computergaga  Před 4 lety

      Maybe test it with an IF first to check if the end date is later or not. Then you will have the option of doing the formula like in the video, or in reverse to show being ahead of schedule.

  • @glen8607
    @glen8607 Před rokem

    How to calculate the difference between 2 date/time ranges in business days?
    For example, cell A2: 07-Jul-23 18:00hrs and B2: 09-Jul-23 10:00hrs
    The result in C2 should reflect "00 Days 06 Hours" since Saturday and Sunday must be completely excluded in the calculation.
    I tried all possible options including chat GPT but failed in getting the formula😢

  • @honestman2001
    @honestman2001 Před rokem

    how do i exclude weekends from this?

  • @ritztiolengco2964
    @ritztiolengco2964 Před 3 lety

    Is it possible to get the average of the result?

  • @randysidroiglesia5201

    What if the "end date" is blank or not filled, What will be the formula?

  • @GoodmanMIke59
    @GoodmanMIke59 Před 2 lety

    This is great but you might have included in a PINNED COMMENT the FUNCTION LINE for us to copy. Naturally we'll learn more your way but would have made things faster if we just need it done.

  • @hammadarain2725
    @hammadarain2725 Před 3 lety

    A.o.A sir, koi esa formula ha jis ka through previous time sa current time less ho kar show ho or jub usa time stop ki command da to time counter stop ho jaye, agar esi koi video ha toh recommend kare kindly.....??

  • @CoryStJohn
    @CoryStJohn Před 4 lety

    Can you do this with 4 date and time entries instead of 2?

    • @Computergaga
      @Computergaga  Před 4 lety

      Sure. You could find the difference between any dates you. Obviously difference is always between two things, but then you could add the difference between two others or whatever your goal is.

  • @bryanbaxter3558
    @bryanbaxter3558 Před 5 lety

    Is there a way to total the difference column?

    • @Computergaga
      @Computergaga  Před 5 lety

      The result here is text so cannot be totalled. You would need to total the separate elements (days, hours etc) separately to get your total.

  • @jessicaspinuzza3345
    @jessicaspinuzza3345 Před 6 lety

    How do I get the negatives to appear red. I'm not sure how to build the custom formatting

    • @Computergaga
      @Computergaga  Před 6 lety

      In custom formatting, whatever you type after the first semicolon is the negative formatting. So you could enter something like 0;[Red]-0 for negative numbers to have red and a minus sign before them.
      You can see this on this video - czcams.com/video/OXw5X-HMwiU/video.html

  • @RajnishYadavabc
    @RajnishYadavabc Před 8 měsíci

    Sir will it work with Excel 365

  • @carlosalfonso7504
    @carlosalfonso7504 Před 6 lety

    Hello, I have a question? After we get the "Difference" in: Days Hours Minutes, how can we get the AVERAGE of those "Differences" in: Days Hours Minutes as well, because it gives me an error when I use AVERAGE.

    • @Computergaga
      @Computergaga  Před 6 lety +2

      Yes the answer contains text strings such as " days" so AVERAGE cannot work with it. You would need to calculate the difference (could be a different column) with just simple B2-A2 formula. Then use the formula from the video on the AVERAGE answer from those responses to tidy it up into days, hours and minutes.

    • @carlosalfonso7504
      @carlosalfonso7504 Před 6 lety +1

      Thank you so much, that will work great! Thanks for all your lessons, they make a huge difference in the way I use Excel!!!

  • @MatteoPozzoli
    @MatteoPozzoli Před 4 lety

    Does not work for me. Most probably not the correct data format for the date & time cells. What do you suggest? Thanks

    • @Computergaga
      @Computergaga  Před 4 lety

      Select your date cells, and separately your time cells. and check the bottom right on your screen for a Sum. That will help check if there are identified as dates and times.

    • @MatteoPozzoli
      @MatteoPozzoli Před 4 lety

      @@Computergaga I have date and time in the same cell as from your example. in the bottom right display sum; date has no sense while hours are a correct sum

  • @tamelastaton1761
    @tamelastaton1761 Před 4 lety

    What format should you use for the dates and times?

    • @Computergaga
      @Computergaga  Před 4 lety

      The dates and times can be in any date and time format. As long as Excel recognises it as a date and time. The answer is text.

  • @natthawiphasidaeng8956

    Thank you so much.

  • @teresagoodman9628
    @teresagoodman9628 Před 5 lety +1

    Using your formula for time elapsed in days, hours and minutes, how would you find the average time?

    • @azychenac
      @azychenac Před 4 lety

      B2=Date 1=2020-07-03 22:59:55
      C2=Date 2=2020-07-02 15:14:22
      A2 =Text(B2-C2,"dd:hh:mm:ss")
      =01:07:45:33
      solution1:
      DAY(LEFT(TEXT(B2-C2,"dd:hh:mm:ss"),2))+TIME(MID(TEXT(B2-C2,"dd:hh:mm:ss"),4,2),MID(TEXT(B2-C2,"dd:hh:mm:ss"),7,2),RIGHT(TEXT(B2-C2,"dd:hh:mm:ss"),2))
      or Soln 2
      :
      DAY(LEFT(TEXT(A2,"dd:hh:mm:ss"),2))+TIME(MID(TEXT(A2,"dd:hh:mm:ss"),4,2),MID(TEXT(A2,"dd:hh:mm:ss"),7,2),RIGHT(TEXT(A2,"dd:hh:mm:ss"),2))
      Result:
      '=1143333 if format to [ss]
      '=01:07:45:33 if format to dd:hh:mm:ss
      '=31:45:33 if format to [h]:mm:ss
      but whichever format is used in the result, u can apply average function now.