SlideShare a Scribd company logo
6
Most read
7
Most read
9
Most read
Working with Dates using Microsoft Excel & DateDif Function
Introduction to Excel DatesInternally Microsoft Excel stores dates as numbersYou can perform simple addition & subtraction calculations using + & - operatorsYou 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 DatesTo 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 1Suppose 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 birthToday’s dateI can use – minus operatorThis represents number of days I am alive
But what about difference in months & years!
Introduction to DATEDIF functionThe answer to the question about month & year is DATEDIFYou can calculate difference of months & years between two dates by using DATEDIFIt’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 parametersstart_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 2d=DaysFunctionsResultsm=MonthsThis says that I am 31 years 0 months & 23 days oldy=Yearsym=Monthsover Yearmd=Daysover Month
Concatenating results / combining results – Example 3Say 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 operatorText are enclosed in “ … “ inverted commas i.e. “I am “DATEDIF function itself which will return the required valuesTo attach any text with formula value we put & ampersand sign outside the “ … “ inverted commas
ConclusionMicrosoft Excel treats dates as numbersYou can perform addition & subtraction operations on datesWhen you type date it will convert the date as per the regional settings of your computer you can play safe by typing dates as mmdddyy10oct09If 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 usePlease visit:www.exceladvise.comFor morePlease comment if you like it, or have anysuggestions.11Photo Courtesy – www.freedigitalphotos.net

More Related Content

What's hot (20)

PDF
Excel functions formulas
LearnIT@UD
 
PPTX
MS Excel Basics
Muhammad Yasir Bhutta
 
PPT
Advanced Excel ppt
Sudipta Mazumder
 
PDF
Spreadsheet Date & Time Functions
Anjan Mahanta
 
PPTX
Switch statement, break statement, go to statement
Raj Parekh
 
PPT
Microsoft Excel Seminar
Meridian Career Institute
 
PPTX
MS-EXCEL Assignment Help
Rahul Kataria
 
PPT
Charts in EXCEL
pkottke
 
PDF
3. lookup functions in excel
Dr. Prashant Vats
 
PPTX
LESSON 3: BASIC SKILLS ON MICROSOFT EXCEL
bonzy_30
 
PPTX
Lesson 15 Using What If Analysis
guevarra_2000
 
PPTX
This keyword and final keyword
kinjalbirare
 
PPT
Basics of C programming
avikdhupar
 
PPTX
Les fonctions d'Excel
mariamlabyad
 
PPT
Variables in C Programming
programming9
 
PPTX
Operators in java
Then Murugeshwari
 
PPTX
Using Excel Functions
Gautam Gupta
 
PPT
Functions in C++
Mohammed Sikander
 
PPTX
Data Validation
Sushmita Ghosh
 
PDF
Spreadsheet text functions
Anjan Mahanta
 
Excel functions formulas
LearnIT@UD
 
MS Excel Basics
Muhammad Yasir Bhutta
 
Advanced Excel ppt
Sudipta Mazumder
 
Spreadsheet Date & Time Functions
Anjan Mahanta
 
Switch statement, break statement, go to statement
Raj Parekh
 
Microsoft Excel Seminar
Meridian Career Institute
 
MS-EXCEL Assignment Help
Rahul Kataria
 
Charts in EXCEL
pkottke
 
3. lookup functions in excel
Dr. Prashant Vats
 
LESSON 3: BASIC SKILLS ON MICROSOFT EXCEL
bonzy_30
 
Lesson 15 Using What If Analysis
guevarra_2000
 
This keyword and final keyword
kinjalbirare
 
Basics of C programming
avikdhupar
 
Les fonctions d'Excel
mariamlabyad
 
Variables in C Programming
programming9
 
Operators in java
Then Murugeshwari
 
Using Excel Functions
Gautam Gupta
 
Functions in C++
Mohammed Sikander
 
Data Validation
Sushmita Ghosh
 
Spreadsheet text functions
Anjan Mahanta
 

Similar to Excel DATEDIFF Function (20)

PPTX
Excel 2007 dates
osuchin
 
PPTX
Date Arithmetic - R.D.Sivakumar
Sivakumar R D .
 
PPTX
04 excel 2007 (dates)
Osuchin Chong
 
XLS
Excel Formulae01
vivek_somani
 
PPTX
Introductionto Spreadsheet - Excel .pptx
SanaShah93
 
PPTX
Training presentation figure out dates by using formulas in excel 2010
sakiru
 
PPTX
Excel 2010 training presentation figure out dates by using formulas in exce...
MFMinickiello
 
PPT
Excel DAYS360 Function
Excel
 
PDF
100 Excel Functions you should know in one handy PDF.pdf
Mohammad Shaar
 
PDF
excel 101 formulas.pdf
Vilas Kharat
 
PDF
If only there was an easier way….of creating a series
Thales Training & Consultancy
 
PDF
Excel formulas-a-quick-list
Narendra Chaurasia
 
PDF
Adv excel-handbook
friday2012
 
PPTX
Intermediate Excel
Lisa De Castro, Ph.D.
 
PDF
Excel tips&tricks
Joel May
 
PPTX
Msoffice introduction
Goral Koladiya
 
PPT
Teacher resources excel power point
David Boin
 
PPTX
Excel finishing
Leslie Noggle
 
DOC
COURSEEXCEL2010PlainandSimple
Carrie E. Williams
 
PDF
The Free Excel Formulas Bible To Get.pdf
trulyblessedmille1
 
Excel 2007 dates
osuchin
 
Date Arithmetic - R.D.Sivakumar
Sivakumar R D .
 
04 excel 2007 (dates)
Osuchin Chong
 
Excel Formulae01
vivek_somani
 
Introductionto Spreadsheet - Excel .pptx
SanaShah93
 
Training presentation figure out dates by using formulas in excel 2010
sakiru
 
Excel 2010 training presentation figure out dates by using formulas in exce...
MFMinickiello
 
Excel DAYS360 Function
Excel
 
100 Excel Functions you should know in one handy PDF.pdf
Mohammad Shaar
 
excel 101 formulas.pdf
Vilas Kharat
 
If only there was an easier way….of creating a series
Thales Training & Consultancy
 
Excel formulas-a-quick-list
Narendra Chaurasia
 
Adv excel-handbook
friday2012
 
Intermediate Excel
Lisa De Castro, Ph.D.
 
Excel tips&tricks
Joel May
 
Msoffice introduction
Goral Koladiya
 
Teacher resources excel power point
David Boin
 
Excel finishing
Leslie Noggle
 
COURSEEXCEL2010PlainandSimple
Carrie E. Williams
 
The Free Excel Formulas Bible To Get.pdf
trulyblessedmille1
 
Ad

More from Excel (9)

PPTX
Causes of Financial Model Errors
Excel
 
PPTX
Spreadsheet risks & mitigation
Excel
 
PPTX
Top 12 gestures if a person is lying
Excel
 
PPTX
Microsoft Excel 2007, things you should KNOW
Excel
 
PPTX
Microsoft Excel 2010 Sparklines
Excel
 
PPT
Excel SUMIFS Function
Excel
 
PPTX
Introduction To Excel 2007 Macros
Excel
 
PPTX
Using Multiple Workbooks & Consolidation in Microsoft Excel
Excel
 
PPT
Microsoft Excel VLOOKUP Function
Excel
 
Causes of Financial Model Errors
Excel
 
Spreadsheet risks & mitigation
Excel
 
Top 12 gestures if a person is lying
Excel
 
Microsoft Excel 2007, things you should KNOW
Excel
 
Microsoft Excel 2010 Sparklines
Excel
 
Excel SUMIFS Function
Excel
 
Introduction To Excel 2007 Macros
Excel
 
Using Multiple Workbooks & Consolidation in Microsoft Excel
Excel
 
Microsoft Excel VLOOKUP Function
Excel
 
Ad

Recently uploaded (20)

PDF
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
PDF
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
PDF
Blockchain Transactions Explained For Everyone
CIFDAQ
 
PDF
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
PPTX
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
PDF
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
PDF
Français Patch Tuesday - Juillet
Ivanti
 
PPTX
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
PDF
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
PDF
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
PDF
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
PDF
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
PDF
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
PDF
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
PPTX
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
PDF
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
PDF
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
PPT
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
PPTX
Top Managed Service Providers in Los Angeles
Captain IT
 
PDF
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 
HCIP-Data Center Facility Deployment V2.0 Training Material (Without Remarks ...
mcastillo49
 
Empower Inclusion Through Accessible Java Applications
Ana-Maria Mihalceanu
 
Blockchain Transactions Explained For Everyone
CIFDAQ
 
Apache CloudStack 201: Let's Design & Build an IaaS Cloud
ShapeBlue
 
UiPath Academic Alliance Educator Panels: Session 2 - Business Analyst Content
DianaGray10
 
Empowering Cloud Providers with Apache CloudStack and Stackbill
ShapeBlue
 
Français Patch Tuesday - Juillet
Ivanti
 
Darren Mills The Migration Modernization Balancing Act: Navigating Risks and...
AWS Chicago
 
Smart Air Quality Monitoring with Serrax AQM190 LITE
SERRAX TECHNOLOGIES LLP
 
CloudStack GPU Integration - Rohit Yadav
ShapeBlue
 
Rethinking Security Operations - SOC Evolution Journey.pdf
Haris Chughtai
 
Persuasive AI: risks and opportunities in the age of digital debate
Speck&Tech
 
Wojciech Ciemski for Top Cyber News MAGAZINE. June 2025
Dr. Ludmila Morozova-Buss
 
LLMs.txt: Easily Control How AI Crawls Your Site
Keploy
 
Extensions Framework (XaaS) - Enabling Orchestrate Anything
ShapeBlue
 
NewMind AI - Journal 100 Insights After The 100th Issue
NewMind AI
 
Impact of IEEE Computer Society in Advancing Emerging Technologies including ...
Hironori Washizaki
 
Interview paper part 3, It is based on Interview Prep
SoumyadeepGhosh39
 
Top Managed Service Providers in Los Angeles
Captain IT
 
Predicting the unpredictable: re-engineering recommendation algorithms for fr...
Speck&Tech
 

Excel DATEDIFF Function

  • 1. Working with Dates using Microsoft Excel & DateDif Function
  • 2. Introduction to Excel DatesInternally Microsoft Excel stores dates as numbersYou can perform simple addition & subtraction calculations using + & - operatorsYou 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 DatesTo 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 1Suppose 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 birthToday’s dateI can use – minus operatorThis represents number of days I am alive
  • 5. But what about difference in months & years!
  • 6. Introduction to DATEDIF functionThe answer to the question about month & year is DATEDIFYou can calculate difference of months & years between two dates by using DATEDIFIt’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 parametersstart_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 2d=DaysFunctionsResultsm=MonthsThis says that I am 31 years 0 months & 23 days oldy=Yearsym=Monthsover Yearmd=Daysover Month
  • 10. Concatenating results / combining results – Example 3Say 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 operatorText are enclosed in “ … “ inverted commas i.e. “I am “DATEDIF function itself which will return the required valuesTo attach any text with formula value we put & ampersand sign outside the “ … “ inverted commas
  • 11. ConclusionMicrosoft Excel treats dates as numbersYou can perform addition & subtraction operations on datesWhen you type date it will convert the date as per the regional settings of your computer you can play safe by typing dates as mmdddyy10oct09If 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 usePlease visit:www.exceladvise.comFor morePlease comment if you like it, or have anysuggestions.11Photo Courtesy – www.freedigitalphotos.net