Calculate the Difference Between Dates

Поділитися
Вставка
  • Опубліковано 27 сер 2024
  • You have two dates and wondering what to do with them. There is a start date and and end date and you want to know how many days are in between them. Or want to know how many works days or months or even years are between these dates. Trying doing this by hand or even with a calculator and you'll go crazy. You need a date calculator but don't want to always go online. Do this will Excel and you'll be done in less time it takes to get a cup of coffee. Check out the video to see how to do the calculate the difference between dates with various date functions.
    🔔 SUBSCRIBE to my channel ➜ goo.gl/wN3c3p
    🏫 Excel Training ➜ www.exceltrain...
    📚 Excel Books & Tech Gear ➜ www.amazon.com...
    ⚙️ Tools: Screencasting ➜ techsmith.z6rj...
    ⚙️ Tools: Microsoft Office ➜ microsoft.msaf...
    ⚙️ Tools: TubeBuddy ➜ www.tubebuddy....
    📝 This description may contain affiliate links and we'll receive a small commission if a purchased is made using the links (but at no additional cost to you). It'll support the channel and so more videos like this can be made. Thanks for your support!
    🎁 If you find these videos useful and want to support my channel go to www.buymeacoff...
    #excel
    #msexcel
    #doughexcel
    ~-~~-~~~-~~-~
    Please watch: "Convert Table in a PDF File to Excel"
    • Convert Table in a PDF...
    ~-~~-~~~-~~-~

КОМЕНТАРІ • 109

  • @views40
    @views40 9 років тому +1

    Thanks Doug!! This formula (along with all your examples) are fantastic! Great job teaching and communicating, too!

  • @raulferro3998
    @raulferro3998 Рік тому

    DATEIF no longer works with EXCEL O365, but the rest still does, so thank you!

    • @DougHExcel
      @DougHExcel  Рік тому

      Hi Raul Ferro, thanks for the comment!

  • @AnwarKhan-kk8io
    @AnwarKhan-kk8io 8 років тому

    I seldom works on my some worksheet but I was often confused to put out in dates figures, your tutorials give me a guide which is very useful. I got it very easily remember date formula. Thanks

    • @DougHExcel
      @DougHExcel  3 роки тому

      Thanks Anwar Khan, glad it helped!

  • @jazzista1967
    @jazzista1967 9 років тому

    Doug. great video as always.. never saw such an obscure function but very useful. It helped me to calculate the numbers of years to accrue an ARO liability. Thanks

  • @corrinarogers2055
    @corrinarogers2055 9 років тому

    That was REALLY helpful and just what I needed to produce a report for work which saved me a lot of time and difficulty!
    Explained clearly and was very easy to follow.
    THANK YOU!!!

  • @anhto7623
    @anhto7623 5 років тому

    Thank you for sharing the datedif function. This is very useful. I love watching all your videos... very educational. Thank you again!

    • @DougHExcel
      @DougHExcel  5 років тому

      Hi Anh To, glad you liked it, thanks for commenting!

  • @adnanakhtar7
    @adnanakhtar7 11 років тому

    thanks you for explaining it in detail

  • @200596U
    @200596U 2 роки тому

    So useful, thank you so much!

  • @emo9511
    @emo9511 11 років тому

    now my IT teacher is not cutting my head off ;dd .... thank you man ;)

  • @atg8728
    @atg8728 9 років тому

    you are brilliant!, thanks a million

  • @arunbomjan4301
    @arunbomjan4301 9 років тому

    thank you Doug H for your support

  • @gisgrl1532
    @gisgrl1532 8 років тому +2

    Super easy to follow

    • @DougHExcel
      @DougHExcel  3 роки тому

      Hi GIS GRL, thanks for the comment!

  • @kumari17
    @kumari17 9 років тому

    u have shared vital information that i don't know it.

  • @shivap8164
    @shivap8164 10 років тому

    Hi, Canu pls. help out the exact formula to find difference between 2 dates with time and seconds and diffrence between days is more than 2

  • @MsThePoint
    @MsThePoint 7 років тому

    Easy and accurate. Thanks!

    • @DougHExcel
      @DougHExcel  7 років тому

      You're welcome, thanks for commenting!

  • @geebullz9130
    @geebullz9130 7 років тому

    Thank you! This was very helpful

  • @alexrosen8762
    @alexrosen8762 7 років тому

    Great explanation as usual. Thanks Doug

  • @mhai3254
    @mhai3254 7 років тому

    Very helpful. Thank u.

    • @DougHExcel
      @DougHExcel  7 років тому

      Hi Mailyn Awi...you're welcome, glad you liked!

  • @mlvgun
    @mlvgun 12 років тому

    Thanks it is helpful a lot

  • @devendrarajput6858
    @devendrarajput6858 8 років тому

    Thanks very helpful

    • @DougHExcel
      @DougHExcel  8 років тому

      Glad you found this helpful!

  • @redaerswen
    @redaerswen 3 роки тому

    Thanks, I do not have years as you have. What I have is 2/1/1900 0:00 if I have start date of 0/11/2006 and end date of 31/10/2008. Why?

  • @chandreshsoni1047
    @chandreshsoni1047 4 роки тому

    Nice video but u have not showed that in last example how may months are ther in 9 years +6 moths total to be calculated in this video ?

    • @DougHExcel
      @DougHExcel  4 роки тому

      It should have been at this spot >> ua-cam.com/video/Y9rlqOQBNQI/v-deo.html

  • @beenay18
    @beenay18 Рік тому

    datedif formula causes "number error" in my excel. this formula just does not work in my excel. does anybody know what might be the issue?

  • @vram11
    @vram11 8 років тому

    very helpful..... Tk u...

  • @tejacavalera
    @tejacavalera 11 років тому

    Thx 4 the lesson

  • @samd6967
    @samd6967 10 років тому

    what if you want it to show as a negative if it is less then?

  • @1204joey
    @1204joey 12 років тому

    can you explain why it doesnt count the number of month when you change the year?

  • @sonison01
    @sonison01 9 років тому

    Hi, hope you can help me: I need my spreadsheet to highlight contractors whose contracts are about to finish in 3 months time from current date. How do I go about it please? thanks

  • @ezhilbala9865
    @ezhilbala9865 11 років тому

    very thanks

  • @shafiulalam2532
    @shafiulalam2532 7 років тому

    Thanks

  • @norbenmanatad5650
    @norbenmanatad5650 11 років тому

    hey Dude look at 5:38 - 5:40 how come that the days suddenly change.?
    can you explain.

  • @kaye9496
    @kaye9496 12 років тому

    thank you very much... :)

  • @Akhtarkhan-si2bo
    @Akhtarkhan-si2bo 7 років тому

    How could we calculate year/s and month/s in one row or column e.g. Job started on 06/2016 and ended on 08/2017 and the result should reflect as 1.2 years?

    • @DougHExcel
      @DougHExcel  7 років тому

      Have you tried the YEARFRAC function? See vid ua-cam.com/video/SQri66oYGe8/v-deo.html

  • @angelerameau4851
    @angelerameau4851 8 років тому

    How do I export a tickler Excel worksheet to Outlook so it can sync with Outlook calendar?

    • @angelerameau4851
      @angelerameau4851 8 років тому

      I found a solution but it will only works with one variable at a time: One subject, location, start date/time, end date/time but not for the multiple variables that I have in my Excel table

  • @knopalma
    @knopalma 9 років тому

    Hi Doug! I'm calculating the difference between 05/01/2015 and 07/31/2015. When I used the datedif function, it only gave me 2 months difference when it should've been 3 months. How do you go about this without necessarily adding 1 to the equation?

    • @knopalma
      @knopalma 9 років тому

      ***** Thank you for your fast reply. It's working now. This tutorial made my life a little easier now. Kudos!

  • @christieindah2517
    @christieindah2517 9 років тому

    hi dough,
    is it not applicable to 2007? i have tried but it said "the formula you typed contains an error"
    i have changed the format into date as well.

  • @kathrynlight3869
    @kathrynlight3869 2 роки тому

    The reason that DateDif (not dated If, Date Difference) isn't documented is because it always rounds down and even if you add 15 to days to the End date, it's still flakey if you want to calculate partial months. It's the same in SQL Server and honestly if you want the logical number of partial months between 2 dates then it really doesn't work.

    • @DougHExcel
      @DougHExcel  2 роки тому

      Hi Kathryn Light, thanks for the comment!

  • @alinshatvs5544
    @alinshatvs5544 9 років тому

    tks dr

  • @chrisrogers8733
    @chrisrogers8733 10 років тому

    Good morning sir. I am having some trouble with this basic function. I realize it is me however I can't seem to get this to work. I don't thing my version of 2011 excel matters however I am trying to take 31 Nov 2019 from 7 Sep 2014 to show the difference of how many day between. When I do the steps as you have My sheet comes up with #VALUE!, why is this?

    • @11567561
      @11567561 4 роки тому

      There is only 30 days in November.

  • @ihealthspacanada3263
    @ihealthspacanada3263 8 років тому

    Nice to know

  • @Mapiemma
    @Mapiemma 8 років тому

    hi, good explanation! Isn't it that every month has a 30 and the next 31days?

    • @DougHExcel
      @DougHExcel  3 роки тому

      Hi Luc. C., thanks for the comment!

  • @CuriousKL
    @CuriousKL 5 років тому

    I have been attempting to create a personal auto maintenance sheet that lists the specified intervals for particular maintenance items, to show specified mile intervals and month intervals. Going to the right, I list the odometer reading and date that maintenance item was performed. Showing remaining miles when to perform that same maintenance is easy, but I cannot figured out how to list the remaining months from when it was performed to when it will be needed again in months. I have the current date NOW at top form and a space to enter current Odometer reading to calculate the remaining miles. It's the month thing that I can't get. Months range from 12 to 84 months. Wish I could put my sheet up somewhere for someone to see.

    • @DougHExcel
      @DougHExcel  4 роки тому

      Hi Keith Dunbar, thanks for the comment. This vid might give some insight ua-cam.com/video/pqK5SV4u0t4/v-deo.html

  • @kabiransari7256
    @kabiransari7256 6 років тому

    how to calculate only months? example: 9-11-2017 to 1-04-2018 answer will comes "5". how do this?

    • @DougHExcel
      @DougHExcel  3 роки тому

      =DATEDIF(EOMONTH(A1,0),EOMONTH(A2,0),"m")+1 , where cell A1= 9/11/17 and A2=1/4/18

  • @MazenItani
    @MazenItani 8 років тому

    How about early ages ??
    Difference between, lets say, 2/28/1875 and 6/15/2015 ?
    Knowing that m. excel doesn't recognize the date before 1/1/1900

  • @abdulrasheed-ix9pm
    @abdulrasheed-ix9pm 3 роки тому

    am getting error like #VALUE!
    while using datedif why?

    • @DougHExcel
      @DougHExcel  3 роки тому

      check if the value referenced is number value or text (that looks like number)

  • @anniepannie8682
    @anniepannie8682 8 років тому

    Hi Doug,
    Do you know how I would set up an IF fx if I wanted to ultimately fill blank rows in a column that already has existing data in it. I would like to fill the blank spaces here with a date from a different column but only if another column has a "NO" in it. So for example: I have 5 columns total and column B has blank rows in it that I would like to fill but only based on column A. If column A has a "No", then I would like to put the date that is in column E to fill in this blank space in column B, but again, filling the blank space depends on if Column A has a Yes or No and will only use the date from column E....Is this possible?
    Thank you for any help that you can provide.
    Thanks again,
    Ann

  • @Mr1054EDP
    @Mr1054EDP 8 років тому

    Great video and definitely very useful.. I do have a question. I'm a military leader and have to produce yearly evaluations on specific personnel with different start dates. Example: If I have a Soldier that is promoted to Sgt, that Soldier is due an evaluation one year from the date of promotion. The number of Soldiers I have in this category is overwhelming and hard to track if I don't have a reminder. I would like to create a formula that will act as a countdown to the due date. I'd appreciate all the help I can get. Thanks

    • @wadieseruge3523
      @wadieseruge3523 7 років тому

      Hello, Did you get the answer to your question? I was in that situation myself.

    • @DougHExcel
      @DougHExcel  3 роки тому

      maybe something like this will give an idea ua-cam.com/video/pqK5SV4u0t4/v-deo.html

  • @tommiejohnson4363
    @tommiejohnson4363 6 років тому

    my start date and end date want produce a value example
    12/21/2017 01/10/2018 how many days I used =networks(A1,B1)

    • @DougHExcel
      @DougHExcel  3 роки тому

      Hi Tommie Johnson, thanks for the comment

  • @praveenprajapat8088
    @praveenprajapat8088 12 років тому

    but how i will calculate quarter between years???????

  • @claire0439
    @claire0439 9 років тому

    Say the dates you are looking at are for an age. Is it possible to find both months and days in the same cell?
    Or year, month, days?

  • @monster911isme
    @monster911isme 9 років тому

    Need some help here...Base on my sheet the M7 cell which the joined date have got a formula like this =VLOOKUP($C$3,VALIDATION!$A$2:$M$500,9,FALSE), so when I choose in C3 (drop-down list different employee number) the joined date in cell M7 will change, so from there the number of months in J11 will change according to the joined date. IF M7 GOT 1/3/2011 (IT NEED TO BE CHANGE AS 1/3/2013) SUBTRACT TO TODAY DATE 26/10/2014 SO I NEED THE ANSWER OF 19MONTHS (because 1/3/2013 to 1/3/2014 = 12 months or 1 year then + the 1/3/2014 to today date 26/10/2014 = 7 months so MUST BE TOTAL OF 12+7 = 19MONTHS... then only I can count how many entitled leave they can have to date. thank you again...

  • @abdulhamidalhaddadi9737
    @abdulhamidalhaddadi9737 7 років тому

    Hi Sir,
    It does not work with me in date format (30/12/2017)
    it works in single digit (3/12/2017)
    when I try to change date format it give me ( 3-Dec-17)
    but (30/12/2017) still remain as it is, and result was : #NUM!.
    can you solve it please

    • @DougHExcel
      @DougHExcel  3 роки тому

      Hi Abdul Hamid Alhaddadi, sorry I don't do consulting 🙁....but try a post on the mrexcel.com forum!

  • @esadtheblue
    @esadtheblue 7 років тому

    Hi, I am getting the #VALUE! error, what seems to be the problem?

    • @DougHExcel
      @DougHExcel  7 років тому

      it might be that the function is looking for a number, but is doing calculation on text string. You may want to check out if the reference cells are strings or numbers.

  • @1223abhi
    @1223abhi 8 років тому

    Hi Doug,
    I have small query i want to add exp of employees in YY::DD format. For Example if i have to find out total exp of an employee which includes previous exp and current experience. You can consider 2.10 (years n months)as previous exp and current comp exp is 2.11 (years n months) total should be 5.9 (years n months) but when try to sum i am not getting the same value i tried using year and month functions. Can you help me without using any macros.

    • @DougHExcel
      @DougHExcel  3 роки тому

      Hi Abinash Kumar, sorry 🙁....but try a post on the mrexcel.com forum!

  • @Live86400
    @Live86400 6 років тому

    Hey Doug, Can you help me with a formula. I have a Date for example (12/19/2017) that I acquired a product in cell P2. I want to calculate the number of days it's been in inventory up until TODAY That's the first number I want that cell to show. I figured that's easy =Today()-P2 and yes that does display what I need. But when the product sells and I input the Sold date in Cell S2 i want it to show only the amount of days it took to sell the product rather than the number of days it's been in inventory. what should this formula look like? Thanks for your help!

    • @DougHExcel
      @DougHExcel  6 років тому

      Wouldn't it be the S2 (sold date) minus P2(acquired date)? It seems that if the product hasn't sold, the inventory date calculation should occur but if the item sold the days item was in inventory equals to the the days it took to sell the item.

    • @Live86400
      @Live86400 6 років тому

      Doug H yes your right. What I’m trying to do is display a running number of days in inventory up until the sold date is entered then I want that number to switch to the amount of days it took to sell it when the sold date is entered.

    • @DougHExcel
      @DougHExcel  6 років тому

      Try using a combination of ISBLANK function inside of an IF statement. It could be summarizes like if the sell date cell value is blank, then use the TODAY function minus the acquired date, if it's not blank then use the sales date minus the acquired date.
      Some vids on the above functions:
      ISBLANK => ua-cam.com/video/oZnI0RcGQZk/v-deo.html
      IF => ua-cam.com/video/vNmZThJltOw/v-deo.html

  • @algazac
    @algazac 7 років тому

    Well, for the first 3 examples is just the absolute value of each different; doesn't that work for everything?

    • @DougHExcel
      @DougHExcel  7 років тому

      In a way yes since excel translated the date into serial number value. The functions are just various ways to get to it.

  • @Hatasiz_Cool
    @Hatasiz_Cool 4 роки тому

    why isnt there weeks in any videos:) everybody forgot the weeks?

    • @DougHExcel
      @DougHExcel  4 роки тому

      yea there are couple ways to do this but you can use the DATEDIF for days and divide by 7

    • @Hatasiz_Cool
      @Hatasiz_Cool 4 роки тому

      Doug H thanks for the reply..yeah i know this way, but i always need to make adjustment by using this method. So i was wondering if there is any other way to calculate that.

  • @skhumbuzocele1330
    @skhumbuzocele1330 5 років тому

    THE YEAR FUNCTION IS NOLONGER VALID IN 2019 Excel 2013

    • @DougHExcel
      @DougHExcel  4 роки тому

      skhumbuzo cele, that is very interesting...thanks for letting me know.

  • @ahmedabaza165
    @ahmedabaza165 7 років тому

    يزااامل

    • @DougHExcel
      @DougHExcel  3 роки тому

      شكرا على التعليق

  • @muhammedcesim857
    @muhammedcesim857 4 роки тому

    G

    • @DougHExcel
      @DougHExcel  4 роки тому

      Hi muhammed cesim, thanks for the comment!

  • @bernardhernandez5917
    @bernardhernandez5917 9 років тому

    Can I ask for your email?

  • @norbenmanatad5650
    @norbenmanatad5650 11 років тому

    ahhh i get it sorry dude.^_^ eheh

  • @jpaksgwapito775
    @jpaksgwapito775 6 років тому

    not accurate at all

    • @DougHExcel
      @DougHExcel  4 роки тому

      Alien Predator, that is very interesting...thanks for letting me know.

  • @vram11
    @vram11 8 років тому

    very helpful..... Tk u...

    • @DougHExcel
      @DougHExcel  3 роки тому

      Hi Vivek Anand, thanks for the comment!