Excel DateDif function - difference between two dates
Ойын-сауық
In Excel, if you need to calculate the difference between two dates in years, month, or days, the DATEDIF function will handle it. DATEDIF is "Date & Dif". It is an interesting function since it does not show up in the Date & Time function in Excel. DATEDIF has three arguments - start date, end date, and date unit (year/month/ or date).
Reason to use DATEDIF
Get days, months, or years between two dates
HR could use this to see how long employees have worked. We could track how long customers have been in the system.
Syntax
=DATEDIF (start_date, end_date, unit)
File download for DateDif - two worksheets
chrismenardtraining.com/Files...
Chapters:
0:00 Intro
0:45 DateDif - Year Y
2:36 DateDif - Month M
2:47 DateDif - Day D
3:45 DateDif - YM
4:37 DateDif - MD
5:00 absolute & relative
6:02 asbolute & mixed
7:35 important note about file
Unit Result
Screenshot with examples drive.google.com/file/d/1QyKF...
"y" Difference in complete years
"m" Difference in complete months
"d" Difference in days
"md" Difference in days, ignoring months and years
"ym" Difference in months, ignoring years
"yd" Difference in days, ignoring years
#msexcel #microsoftexcel #chrismenardtraining
Warning: Excel provides the DATEDIF function in order to support older workbooks from Lotus 1-2-3. The DATEDIF function may calculate incorrect results under certain scenarios. Please see the known issues section of this article for further details.
Chris Menard's website: chrismenardtraining.com
Cristian's KZread Channel: / @graphicious
And make sure you subscribe to my channel!
- EQUIPMENT USED --------------------------------
○ My camera - amzn.to/3vdgF5E
○ Microphone - amzn.to/3gphDXh
○ Camera tripod - amzn.to/3veN6Rg
○ Studio lights - amzn.to/3vaxyy5
○ Dual monitor mount stand - amzn.to/3vbZSjJ
○ Web camera - amzn.to/2Tg75Sn
○ Shock mount - amzn.to/3g96FGj
○ Boom Arm - amzn.to/3g8cNi6
- SOFTWARE USED --------------------------------
○ Screen recording - Camtasia - chrismenardtraining.com/camtasia
○ Screenshots - Snagit - chrismenardtraining.com/snagit
○ KZread keyword search - TubeBuddy - www.tubebuddy.com/chrismenard
DISCLAIMER: Links included in this description might be affiliate links. If you purchase a product or service with the links I provide, I may receive a small commission. There is no additional charge to you! Thank you for supporting my channel, so I can continue to provide you with free content each week!
Пікірлер: 12
Thanks for the clip Chris. There is so much i need learn and quickly for a spreadsheet, but not sure where to start.
Thank you for perfect explanation.
Chris thanks for the great explanation of this function. Just thinking of way to apply it. One situation would be for calculating seniority dates for say shift assignments or promotions.
Great explanation.Thank you so much
@ChrisMenardTraining
Жыл бұрын
You are welcome!
What formula would I use to calculate where there is no date. So, Column A is Start date, Column B is Closed date, Column C is Running time (days). I want to know the running time regardless of whether it is closed or not. So if its not closed i need it to calculate to "today's" date, but if there is a close date to the date it was closed. Ive done it before but cannot remember how
Chris, How would I obtain "Months" in the future? I get negative numbers. I require "Months until due date" on a financial spreadsheet. Thanks!
Why the result of 31/07/2020 & 30/09/2020 is 1 Month using Datedif(start_date,end_date,"M") instead of 2 months? The problem is with all such months having 31 days, the result is always less than one month.
nice. put excel file link download in the description ===
@ChrisMenardTraining
3 жыл бұрын
chrismenardtraining.com/Files/DownloadFile.aspx?FUID=535cea01-9b52-42b4-928b-45d471855e9c
This is great. However, I am working with genealogy and have dates from the 17th, 18th, and 19th centuries. your formulas will not work with dates in the 20th and 21st centuries.
Or, all together in one row: =DATEDIF(A1;B1;"Y")&" year(s), "&DATEDIF(A1;B1;"ym")&" month(s) and "&DATEDIF(A1;B1;"md")&" day(s)"