+ Reply to Thread
Results 1 to 7 of 7

Long dates: days in between?

  1. #1
    Registered User
    Join Date
    09-10-2014
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    3

    Long dates: days in between?

    Dear all,

    I receive via e-mail Starting dates and End dates in all kind of forms:

    - Friday, 12 September 2014
    - Friday, September 12 2014
    etc.

    f.e. Friday, 12 September 2014 until Friday, 19 September 2014.

    I copy these dates to excel, where I have a simple formula to calculate the number of days between the end date and the starting date.

    I have 2 problems here:
    - first: my excel only calculates the days between if I would enter a short date first: f.e. 12/09/2014. Fact is that I have only long dates as input.
    - second: due to the different forms of the long date I would have to change my regional settings every time.

    Does anyone see a possibility here in working with the long dates that are provided in different formats?

    Thanks in advance!

  2. #2
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Long dates: days in between?

    Hi, and welcome to the forum.

    Are these dates really different underneath or just formatted differently? Don't be confused by the way a date 'looks' and what the underlying date number actually is.

    Upload your workbook so that we can see your request in context.
    Richard Buttrey

    RIP - d. 06/10/2022

    If any of the responses have helped then please consider rating them by clicking the small star icon below the post.

  3. #3
    Registered User
    Join Date
    09-10-2014
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    3

    Re: Long dates: days in between?

    Please find attached a working sheet:

    I can't calculate the days in between in cel D3 and D6. Only in D9 it works out, because I've inputted there myself the short dates.
    Attached Files Attached Files

  4. #4
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Long dates: days in between?

    Hi,

    Please see the attached file, I have used the following formula to convert the dates into standard format and then calculate the number of days.

    In C3:

    =DATE(RIGHT(B3,4),MONTH(DATEVALUE(MID(B3,FIND(" ",B3,FIND(" ",B3,1)+1)+1,3)&" 1")),MID(B3,FIND(",",B3,1)+2,2))


    In C5:

    =DATE(RIGHT(B6,4),MONTH(DATEVALUE(MID(B6,FIND(",",B6,1)+2,3)& " 1")),MID(B6,FIND(",",B6,FIND(",",B6,1)+1)-2,2))
    Attached Files Attached Files

  5. #5
    Registered User
    Join Date
    09-10-2014
    Location
    Belgium
    MS-Off Ver
    2010
    Posts
    3

    Re: Long dates: days in between?

    This formula does the trick!
    Thanks :-)

  6. #6
    Forum Expert cbatrody's Avatar
    Join Date
    04-15-2014
    Location
    Dubai
    MS-Off Ver
    Microsoft Office 365 ProPlus
    Posts
    2,136

    Re: Long dates: days in between?

    You are welcome

    If that takes care of your question, please mark this thread as Solved by selecting Thread Tools --> Mark thread as solved.

    Also, you can directly thank those who have helped you by clicking on the small * (star) icon located in the lower left corner of a post that you have found to be helpful.

  7. #7
    Forum Moderator - RIP Richard Buttrey's Avatar
    Join Date
    01-14-2008
    Location
    Stockton Heath, Cheshire, UK
    MS-Off Ver
    Office 365, Excel for Windows 2010 & Excel for Mac
    Posts
    29,464

    Re: Long dates: days in between?

    Quote Originally Posted by Benjiboy007 View Post
    Dear all,

    I receive via e-mail Starting dates and End dates in all kind of forms:
    ..as an aside and if at all possible I'd urge you to try and manage the provision of data in a consistent format.

+ 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. Replies: 2
    Last Post: 02-20-2014, 06:40 AM
  2. [SOLVED] Number of Days Between Dates but if no Date go to next and return # of Days
    By Bikeman in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 12-14-2012, 12:02 PM
  3. Replies: 1
    Last Post: 11-01-2012, 03:41 PM
  4. [SOLVED] Subtract Two Dates By The Number of Days, But Only Inlcude Work Days
    By ptho16 in forum Excel Formulas & Functions
    Replies: 1
    Last Post: 08-16-2012, 11:31 AM
  5. Replies: 4
    Last Post: 12-16-2011, 02:55 PM

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