SlideShare ist ein Scribd-Unternehmen logo
1 von 11
Working with Dates using Microsoft Excel & DateDif Function
Introduction to Excel Dates Internally Microsoft Excel stores dates as numbers You can perform simple addition & subtraction calculations using + & - operators You can type dates either in the format of mm/dd/yyyy (if your regional settings is set to American date) or dd/mm/yyyy (if it is in British format) But the safest way is to type ddmmmyy i.e. 10sep09 will automatically converted by excel to a date representing 10-Sep-09
Introduction to Excel Dates To insert a date which automatically updates you can use a built in function: =DATE() If you want to enter a static current date you can also use the following shortcut key: Ctrl + ;that is press control key hold it down and along with that press ; key
Calculating Difference in Days – Example 1 Suppose if I want to calculate my age in days i.e. how many days I have spent till my birth in this world and if today’s date is 07-Oct-09, I can use the minus operator to do that: My date of birth Today’s date I can use – minus operator This represents number of days I am alive
But what about difference in months & years!
Introduction to DATEDIF function The answer to the question about month & year is DATEDIF You can calculate difference of months & years between two dates by using DATEDIF It’s one of the functions which is very rarely found in the Microsoft’s documentation for some good reasons
Syntax of DATEDIF =DATEDIF(start_date, end_date, “interval” ) The function have 3 parameters start_date: This is the date from which you want to calculate the difference this date should be an older date than the end_date. end_date: This date is the date to which you want to calculate the difference, it should be higher than the start_date. “interval”: As the syntax shows it should be included in “ … “ inverted commas, number of options in next slide. 7
“interval” You can have any of the following values for the “interval” parameter: “d”: This parameter is used if you want difference in days “m”: This parameter is used if you want difference in months “y”:This parameter is used if you want difference in years “md”: This parameter is used if you want difference in days over months “ym”: This parameter is used if you want difference in months over year
Calculating Difference of Months & Years – Example 2 d=Days Functions Results m=Months This says that I am 31 years 0 months & 23 days old y=Years ym=Monthsover Year md=Daysover Month
Concatenating results / combining results – Example 3 Say we want that Excel should display all the result in one cell i.e. 31 years 0 months & 23 days I can get help from & ampersand operator Text are enclosed in “ … “ inverted commas i.e. “I am “ DATEDIF function itself which will return the required values To attach any text with formula value we put & ampersand sign outside the “ … “ inverted commas
Conclusion Microsoft Excel treats dates as numbers You can perform addition & subtraction operations on dates When you type date it will convert the date as per the regional settings of your computer you can play safe by typing dates as mmdddyy10oct09 If you want to calculate difference of dates for the intervals of months or years or even days over months and months over year you have a function DATEDIF which you can use Please visit: www.exceladvise.com For more Please comment if you like it, or have any suggestions. 11 Photo Courtesy – www.freedigitalphotos.net

Weitere ähnliche Inhalte

Was ist angesagt?

Ms excel ppt presentation
Ms excel ppt presentationMs excel ppt presentation
Ms excel ppt presentationvethics
 
VLOOKUP HLOOKUP INDEX MATCH
VLOOKUP HLOOKUP INDEX MATCHVLOOKUP HLOOKUP INDEX MATCH
VLOOKUP HLOOKUP INDEX MATCHMridul Bansal
 
Using Excel Functions
Using Excel FunctionsUsing Excel Functions
Using Excel FunctionsGautam Gupta
 
ms excel presentation...
ms excel presentation...ms excel presentation...
ms excel presentation...alok1994
 
Vlookup - an introduction
Vlookup - an introductionVlookup - an introduction
Vlookup - an introductionvvmenon22
 
Advanced Filter in Excel
Advanced Filter in ExcelAdvanced Filter in Excel
Advanced Filter in Exceldinesh takyar
 
Microsoft Excel VLOOKUP Function
Microsoft Excel VLOOKUP FunctionMicrosoft Excel VLOOKUP Function
Microsoft Excel VLOOKUP FunctionExcel
 
Spreadsheet text functions
Spreadsheet text functionsSpreadsheet text functions
Spreadsheet text functionsAnjan Mahanta
 
Excel presentation data validation
Excel presentation   data validationExcel presentation   data validation
Excel presentation data validationNagamani Y R
 
Pivot table and Dashboard in microsoft excel
Pivot table  and Dashboard in microsoft excelPivot table  and Dashboard in microsoft excel
Pivot table and Dashboard in microsoft excelFrehiwot Mulugeta
 
Excel functions formulas
Excel functions formulasExcel functions formulas
Excel functions formulasLearnIT@UD
 

Was ist angesagt? (20)

Ms excel ppt presentation
Ms excel ppt presentationMs excel ppt presentation
Ms excel ppt presentation
 
VLOOKUP HLOOKUP INDEX MATCH
VLOOKUP HLOOKUP INDEX MATCHVLOOKUP HLOOKUP INDEX MATCH
VLOOKUP HLOOKUP INDEX MATCH
 
Using Excel Functions
Using Excel FunctionsUsing Excel Functions
Using Excel Functions
 
ms excel presentation...
ms excel presentation...ms excel presentation...
ms excel presentation...
 
Basic excel training
Basic excel trainingBasic excel training
Basic excel training
 
Vlookup - an introduction
Vlookup - an introductionVlookup - an introduction
Vlookup - an introduction
 
Ms excel 2007
Ms excel 2007Ms excel 2007
Ms excel 2007
 
Introduction of Advance Excel
Introduction of Advance ExcelIntroduction of Advance Excel
Introduction of Advance Excel
 
Advanced Filter in Excel
Advanced Filter in ExcelAdvanced Filter in Excel
Advanced Filter in Excel
 
Microsoft Excel VLOOKUP Function
Microsoft Excel VLOOKUP FunctionMicrosoft Excel VLOOKUP Function
Microsoft Excel VLOOKUP Function
 
Intermediate Excel
Intermediate Excel Intermediate Excel
Intermediate Excel
 
Na payroll
Na payrollNa payroll
Na payroll
 
Spreadsheet text functions
Spreadsheet text functionsSpreadsheet text functions
Spreadsheet text functions
 
View Tab in Ms-Excel
View Tab in Ms-ExcelView Tab in Ms-Excel
View Tab in Ms-Excel
 
Excel presentation data validation
Excel presentation   data validationExcel presentation   data validation
Excel presentation data validation
 
Pivot table and Dashboard in microsoft excel
Pivot table  and Dashboard in microsoft excelPivot table  and Dashboard in microsoft excel
Pivot table and Dashboard in microsoft excel
 
Ms access
Ms accessMs access
Ms access
 
Excel functions formulas
Excel functions formulasExcel functions formulas
Excel functions formulas
 
Microsoft Excel Basics
Microsoft Excel BasicsMicrosoft Excel Basics
Microsoft Excel Basics
 
Intro to Microsoft Excel 2007
Intro to Microsoft Excel 2007Intro to Microsoft Excel 2007
Intro to Microsoft Excel 2007
 

Ähnlich wie Excel DATEDIFF Function

Applied Excel for Business and Marketing
Applied Excel for Business and MarketingApplied Excel for Business and Marketing
Applied Excel for Business and Marketingijtsrd
 
Excel 2007 dates
Excel 2007 datesExcel 2007 dates
Excel 2007 datesosuchin
 
13 -times_and_dates
13  -times_and_dates13  -times_and_dates
13 -times_and_datesHector Garzo
 
C programming & data structure [arrays & pointers]
C programming & data structure   [arrays & pointers]C programming & data structure   [arrays & pointers]
C programming & data structure [arrays & pointers]MomenMostafa
 
Top 20 microsoft excel formulas you must know
Top 20 microsoft excel formulas you must knowTop 20 microsoft excel formulas you must know
Top 20 microsoft excel formulas you must knowAlexHenderson59
 
Lo17
Lo17Lo17
Lo17lksoo
 
e computer notes - Single row functions
e computer notes - Single row functionse computer notes - Single row functions
e computer notes - Single row functionsecomputernotes
 
142500146 using-oracle-fast formula-for-payroll-calculations
142500146 using-oracle-fast formula-for-payroll-calculations142500146 using-oracle-fast formula-for-payroll-calculations
142500146 using-oracle-fast formula-for-payroll-calculationsuday reddy
 
USING MICROSOFT EXCEL 2016 Independent Project 6-5 (Mac 2016) 
USING MICROSOFT EXCEL 2016 Independent Project 6-5 (Mac 2016) USING MICROSOFT EXCEL 2016 Independent Project 6-5 (Mac 2016) 
USING MICROSOFT EXCEL 2016 Independent Project 6-5 (Mac 2016) heiditownend
 
Excel functionssimplymeasured
Excel functionssimplymeasuredExcel functionssimplymeasured
Excel functionssimplymeasuredcentral.zone
 
Using Mathematica for computational learning
Using Mathematica for computational learningUsing Mathematica for computational learning
Using Mathematica for computational learningMiles Ford
 
TimeCard for Outlook - Workgroup version
TimeCard for Outlook - Workgroup versionTimeCard for Outlook - Workgroup version
TimeCard for Outlook - Workgroup versionPeter Kalmstrom
 
Excel lesson 2
Excel lesson 2Excel lesson 2
Excel lesson 2spirax1681
 
Visual Basic Review - ICA
Visual Basic Review - ICAVisual Basic Review - ICA
Visual Basic Review - ICAemtrajano
 
Lesson9 Working With Basic Functions
Lesson9 Working With Basic FunctionsLesson9 Working With Basic Functions
Lesson9 Working With Basic Functionsguevarra_2000
 
Microsoft Excel Basics
Microsoft Excel BasicsMicrosoft Excel Basics
Microsoft Excel BasicsCompudon
 

Ähnlich wie Excel DATEDIFF Function (20)

Applied Excel for Business and Marketing
Applied Excel for Business and MarketingApplied Excel for Business and Marketing
Applied Excel for Business and Marketing
 
Excel 2007 dates
Excel 2007 datesExcel 2007 dates
Excel 2007 dates
 
13 -times_and_dates
13  -times_and_dates13  -times_and_dates
13 -times_and_dates
 
C programming & data structure [arrays & pointers]
C programming & data structure   [arrays & pointers]C programming & data structure   [arrays & pointers]
C programming & data structure [arrays & pointers]
 
Top 20 microsoft excel formulas you must know
Top 20 microsoft excel formulas you must knowTop 20 microsoft excel formulas you must know
Top 20 microsoft excel formulas you must know
 
02
0202
02
 
Lo17
Lo17Lo17
Lo17
 
e computer notes - Single row functions
e computer notes - Single row functionse computer notes - Single row functions
e computer notes - Single row functions
 
P2
P2P2
P2
 
142500146 using-oracle-fast formula-for-payroll-calculations
142500146 using-oracle-fast formula-for-payroll-calculations142500146 using-oracle-fast formula-for-payroll-calculations
142500146 using-oracle-fast formula-for-payroll-calculations
 
USING MICROSOFT EXCEL 2016 Independent Project 6-5 (Mac 2016) 
USING MICROSOFT EXCEL 2016 Independent Project 6-5 (Mac 2016) USING MICROSOFT EXCEL 2016 Independent Project 6-5 (Mac 2016) 
USING MICROSOFT EXCEL 2016 Independent Project 6-5 (Mac 2016) 
 
Excel functionssimplymeasured
Excel functionssimplymeasuredExcel functionssimplymeasured
Excel functionssimplymeasured
 
Using Mathematica for computational learning
Using Mathematica for computational learningUsing Mathematica for computational learning
Using Mathematica for computational learning
 
TimeCard for Outlook - Workgroup version
TimeCard for Outlook - Workgroup versionTimeCard for Outlook - Workgroup version
TimeCard for Outlook - Workgroup version
 
Excel lesson 2
Excel lesson 2Excel lesson 2
Excel lesson 2
 
Visual Basic Review - ICA
Visual Basic Review - ICAVisual Basic Review - ICA
Visual Basic Review - ICA
 
Lesson9 Working With Basic Functions
Lesson9 Working With Basic FunctionsLesson9 Working With Basic Functions
Lesson9 Working With Basic Functions
 
Getting power bi
Getting power biGetting power bi
Getting power bi
 
Microsoft Excel Basics
Microsoft Excel BasicsMicrosoft Excel Basics
Microsoft Excel Basics
 
Excel Function Training
Excel Function TrainingExcel Function Training
Excel Function Training
 

Mehr von Excel

Causes of Financial Model Errors
Causes of Financial Model ErrorsCauses of Financial Model Errors
Causes of Financial Model ErrorsExcel
 
Spreadsheet risks & mitigation
Spreadsheet risks & mitigationSpreadsheet risks & mitigation
Spreadsheet risks & mitigationExcel
 
Top 12 gestures if a person is lying
Top 12 gestures if a person is lyingTop 12 gestures if a person is lying
Top 12 gestures if a person is lyingExcel
 
Microsoft Excel 2007, things you should KNOW
Microsoft Excel 2007, things you should KNOWMicrosoft Excel 2007, things you should KNOW
Microsoft Excel 2007, things you should KNOWExcel
 
Excel DAYS360 Function
Excel DAYS360 FunctionExcel DAYS360 Function
Excel DAYS360 FunctionExcel
 
Microsoft Excel 2010 Sparklines
Microsoft Excel 2010 SparklinesMicrosoft Excel 2010 Sparklines
Microsoft Excel 2010 SparklinesExcel
 
Excel SUMIFS Function
Excel SUMIFS FunctionExcel SUMIFS Function
Excel SUMIFS FunctionExcel
 
Introduction To Excel 2007 Macros
Introduction To Excel 2007 MacrosIntroduction To Excel 2007 Macros
Introduction To Excel 2007 MacrosExcel
 
Using Multiple Workbooks & Consolidation in Microsoft Excel
Using Multiple Workbooks & Consolidation in Microsoft ExcelUsing Multiple Workbooks & Consolidation in Microsoft Excel
Using Multiple Workbooks & Consolidation in Microsoft ExcelExcel
 

Mehr von Excel (9)

Causes of Financial Model Errors
Causes of Financial Model ErrorsCauses of Financial Model Errors
Causes of Financial Model Errors
 
Spreadsheet risks & mitigation
Spreadsheet risks & mitigationSpreadsheet risks & mitigation
Spreadsheet risks & mitigation
 
Top 12 gestures if a person is lying
Top 12 gestures if a person is lyingTop 12 gestures if a person is lying
Top 12 gestures if a person is lying
 
Microsoft Excel 2007, things you should KNOW
Microsoft Excel 2007, things you should KNOWMicrosoft Excel 2007, things you should KNOW
Microsoft Excel 2007, things you should KNOW
 
Excel DAYS360 Function
Excel DAYS360 FunctionExcel DAYS360 Function
Excel DAYS360 Function
 
Microsoft Excel 2010 Sparklines
Microsoft Excel 2010 SparklinesMicrosoft Excel 2010 Sparklines
Microsoft Excel 2010 Sparklines
 
Excel SUMIFS Function
Excel SUMIFS FunctionExcel SUMIFS Function
Excel SUMIFS Function
 
Introduction To Excel 2007 Macros
Introduction To Excel 2007 MacrosIntroduction To Excel 2007 Macros
Introduction To Excel 2007 Macros
 
Using Multiple Workbooks & Consolidation in Microsoft Excel
Using Multiple Workbooks & Consolidation in Microsoft ExcelUsing Multiple Workbooks & Consolidation in Microsoft Excel
Using Multiple Workbooks & Consolidation in Microsoft Excel
 

Kürzlich hochgeladen

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxLoriGlavin3
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsPixlogix Infotech
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditSkynet Technologies
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersRaghuram Pandurangan
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.Curtis Poe
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterMydbops
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationKnoldus Inc.
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxLoriGlavin3
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Mark Goldstein
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersNicole Novielli
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality AssuranceInflectra
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxLoriGlavin3
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfIngrid Airi González
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxLoriGlavin3
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Alkin Tezuysal
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024BookNet Canada
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteDianaGray10
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfNeo4j
 

Kürzlich hochgeladen (20)

Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
Transcript: New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptxPasskey Providers and Enabling Portability: FIDO Paris Seminar.pptx
Passkey Providers and Enabling Portability: FIDO Paris Seminar.pptx
 
The Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and ConsThe Ultimate Guide to Choosing WordPress Pros and Cons
The Ultimate Guide to Choosing WordPress Pros and Cons
 
Manual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance AuditManual 508 Accessibility Compliance Audit
Manual 508 Accessibility Compliance Audit
 
Generative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information DevelopersGenerative AI for Technical Writer or Information Developers
Generative AI for Technical Writer or Information Developers
 
How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.How AI, OpenAI, and ChatGPT impact business and software.
How AI, OpenAI, and ChatGPT impact business and software.
 
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data PrivacyTrustArc Webinar - How to Build Consumer Trust Through Data Privacy
TrustArc Webinar - How to Build Consumer Trust Through Data Privacy
 
Scale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL RouterScale your database traffic with Read & Write split using MySQL Router
Scale your database traffic with Read & Write split using MySQL Router
 
Data governance with Unity Catalog Presentation
Data governance with Unity Catalog PresentationData governance with Unity Catalog Presentation
Data governance with Unity Catalog Presentation
 
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptxUse of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
Use of FIDO in the Payments and Identity Landscape: FIDO Paris Seminar.pptx
 
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
Arizona Broadband Policy Past, Present, and Future Presentation 3/25/24
 
A Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software DevelopersA Journey Into the Emotions of Software Developers
A Journey Into the Emotions of Software Developers
 
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance[Webinar] SpiraTest - Setting New Standards in Quality Assurance
[Webinar] SpiraTest - Setting New Standards in Quality Assurance
 
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptxDigital Identity is Under Attack: FIDO Paris Seminar.pptx
Digital Identity is Under Attack: FIDO Paris Seminar.pptx
 
Generative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdfGenerative Artificial Intelligence: How generative AI works.pdf
Generative Artificial Intelligence: How generative AI works.pdf
 
The State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptxThe State of Passkeys with FIDO Alliance.pptx
The State of Passkeys with FIDO Alliance.pptx
 
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
Unleashing Real-time Insights with ClickHouse_ Navigating the Landscape in 20...
 
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
New from BookNet Canada for 2024: Loan Stars - Tech Forum 2024
 
Take control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test SuiteTake control of your SAP testing with UiPath Test Suite
Take control of your SAP testing with UiPath Test Suite
 
Connecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdfConnecting the Dots for Information Discovery.pdf
Connecting the Dots for Information Discovery.pdf
 

Excel DATEDIFF Function

  • 1. Working with Dates using Microsoft Excel & DateDif Function
  • 2. Introduction to Excel Dates Internally Microsoft Excel stores dates as numbers You can perform simple addition & subtraction calculations using + & - operators You can type dates either in the format of mm/dd/yyyy (if your regional settings is set to American date) or dd/mm/yyyy (if it is in British format) But the safest way is to type ddmmmyy i.e. 10sep09 will automatically converted by excel to a date representing 10-Sep-09
  • 3. Introduction to Excel Dates To insert a date which automatically updates you can use a built in function: =DATE() If you want to enter a static current date you can also use the following shortcut key: Ctrl + ;that is press control key hold it down and along with that press ; key
  • 4. Calculating Difference in Days – Example 1 Suppose if I want to calculate my age in days i.e. how many days I have spent till my birth in this world and if today’s date is 07-Oct-09, I can use the minus operator to do that: My date of birth Today’s date I can use – minus operator This represents number of days I am alive
  • 5. But what about difference in months & years!
  • 6. Introduction to DATEDIF function The answer to the question about month & year is DATEDIF You can calculate difference of months & years between two dates by using DATEDIF It’s one of the functions which is very rarely found in the Microsoft’s documentation for some good reasons
  • 7. Syntax of DATEDIF =DATEDIF(start_date, end_date, “interval” ) The function have 3 parameters start_date: This is the date from which you want to calculate the difference this date should be an older date than the end_date. end_date: This date is the date to which you want to calculate the difference, it should be higher than the start_date. “interval”: As the syntax shows it should be included in “ … “ inverted commas, number of options in next slide. 7
  • 8. “interval” You can have any of the following values for the “interval” parameter: “d”: This parameter is used if you want difference in days “m”: This parameter is used if you want difference in months “y”:This parameter is used if you want difference in years “md”: This parameter is used if you want difference in days over months “ym”: This parameter is used if you want difference in months over year
  • 9. Calculating Difference of Months & Years – Example 2 d=Days Functions Results m=Months This says that I am 31 years 0 months & 23 days old y=Years ym=Monthsover Year md=Daysover Month
  • 10. Concatenating results / combining results – Example 3 Say we want that Excel should display all the result in one cell i.e. 31 years 0 months & 23 days I can get help from & ampersand operator Text are enclosed in “ … “ inverted commas i.e. “I am “ DATEDIF function itself which will return the required values To attach any text with formula value we put & ampersand sign outside the “ … “ inverted commas
  • 11. Conclusion Microsoft Excel treats dates as numbers You can perform addition & subtraction operations on dates When you type date it will convert the date as per the regional settings of your computer you can play safe by typing dates as mmdddyy10oct09 If you want to calculate difference of dates for the intervals of months or years or even days over months and months over year you have a function DATEDIF which you can use Please visit: www.exceladvise.com For more Please comment if you like it, or have any suggestions. 11 Photo Courtesy – www.freedigitalphotos.net