+ Reply to Thread
Results 1 to 4 of 4

Exact Difference of Two Dates

  1. #1
    Registered User
    Join Date
    10-07-2019
    Location
    Philippines
    MS-Off Ver
    Version 1902
    Posts
    8

    Exact Difference of Two Dates

    Hi there,

    Need your expertise in getting the exact difference between two dates. I am currently using =YEARFRAC(C4,C5)*12.

    Assuming:

    C4 = Start Date
    C5 = End Date or As of Date

    To give you a brief context, our employees are entitled to 12.5 hours per month. I tried calculating the accrual for two different dates in the same month (e.g. 01 March 2019 to 09 March 2019 and 10 March 2019 to 31 March 2019) but I got 3.33 hours and 8.75 hours respectively which is a bit short for 12.5 hours.

  2. #2
    Forum Expert Pepe Le Mokko's Avatar
    Join Date
    05-14-2009
    Location
    Belgium
    MS-Off Ver
    O365 v 2402
    Posts
    13,453

    Re: Exact Difference of Two Dates

    Welcome to the forum

    Please attach a sample workbook (not a picture or pasted copy). Make sure there is just enough data to demonstrate your need. Include a BEFORE sheet and an AFTER sheet in the workbook if needed to show the process you're trying to complete or automate. Make sure your desired results are shown, mock them up manually if necessary.

    Remember to desensitize the data.

    Click on GO ADVANCED and then scroll down to Manage Attachments to open the upload window.

  3. #3
    Registered User
    Join Date
    10-07-2019
    Location
    Philippines
    MS-Off Ver
    Version 1902
    Posts
    8

    Re: Exact Difference of Two Dates

    Sample workbook attached
    Attached Files Attached Files

  4. #4
    Forum Expert
    Join Date
    02-10-2019
    Location
    Georgia, USA
    MS-Off Ver
    Office 365
    Posts
    2,849

    Re: Exact Difference of Two Dates

    I think the reason you're not getting the exact numbers you're expecting (12.5 hours/month) is because each month is not equal in days. If you take the 9 days (from Mar 1 to Mar 9) and divide that by 31 (days in March), and multiply by 12.5, you get 3.63. And then from Mar 10 - Mar 31, you get 22/31=8.87. 3.63 + 8.87 = 12.50.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Placing data on exact dates
    By karlek18 in forum Excel General
    Replies: 1
    Last Post: 03-21-2019, 10:05 PM
  2. Difference between two exact same figures
    By leemarkin in forum Excel General
    Replies: 2
    Last Post: 10-09-2018, 10:33 AM
  3. Replies: 8
    Last Post: 08-06-2018, 12:26 PM
  4. Know the exact days between 2 dates
    By mbime in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 06-04-2014, 06:29 AM
  5. Know the exact days between 2 dates
    By mbime in forum Excel Formulas & Functions
    Replies: 2
    Last Post: 06-04-2014, 05:02 AM
  6. How to calculate exact date difference in Excel?
    By xlsQ in forum Excel Formulas & Functions
    Replies: 4
    Last Post: 09-14-2012, 05:46 PM
  7. Formulas to count exact dates
    By bdmaguire in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-29-2008, 08:54 AM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1