Finding number of days between 2 dates

Thanks Thanks:  0
Likes Likes:  0
Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: Finding number of days between 2 dates

  1. #1
    New Member
    Join Date
    Aug 2002
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

     
    I have a column of dates, and want to have a further column which shows the days between the date in each cell of the column and the current date (i.e the date stored in the system clock). Can anyone suggest any ways of doing this?

    Ben

  2. #2
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    =TODAY()-A2

  3. #3
    New Member
    Join Date
    Aug 2002
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I had already tried that I'm afraid, it appears to subtract one date from another, and the output is a date. I was hoping to find a way of outputing a number - so that for instace 17/8/02 would give 3 (taking the date format as dd/mm/yyyy, and todays date as the 14th , 17-14=3.

  4. #4
    New Member
    Join Date
    Aug 2002
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I had already tried that I'm afraid, it appears to subtract one date from another, and the output is a date. I was hoping to find a way of outputing a number - so that for instace 17/8/02 would give 3 (taking the date format as dd/mm/yyyy, and todays date as the 14th , 17-14=3.

  5. #5
    New Member
    Join Date
    Aug 2002
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I had already tried that I'm afraid, it appears to subtract one date from another, and the output is a date. I was hoping to find a way of outputing a number - so that for instace 17/8/02 would give 3 (taking the date format as dd/mm/yyyy, and todays date as the 14th , 17-14=3.

  6. #6
    New Member
    Join Date
    Aug 2002
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    I had already tried that I'm afraid, it appears to subtract one date from another, and the output is a date. I was hoping to find a way of outputing a number - so that for instace 17/8/02 would give 3 (taking the date format as dd/mm/yyyy, and todays date as the 14th , 17-14=3.

  7. #7
    New Member
    Join Date
    Aug 2002
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    Oops ...

    Sorry about that

  8. #8
    New Member
    Join Date
    Aug 2002
    Posts
    30
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    This works:

    =DATEDIF(A1,NOW(),"d")

  9. #9
    Board Regular XL-Dennis's Avatar
    Join Date
    Jul 2002
    Location
    Östersund, Sweden
    Posts
    1,920
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

    dbrb2,

    You may try to use following formula:

    =DATEDIF(Date1,Date2,"D") where Date1, Date2 can refer to cells or constant values.

    HTH,
    Dennis
    Kind regards,
    Dennis

    Developing solutions with B4J and B4A

  10. #10
    MrExcel MVP
    Join Date
    Feb 2002
    Location
    Austin, Texas USA
    Posts
    11,654
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default

      
    On 2002-08-14 07:41, dbrb2 wrote:
    This works:

    =DATEDIF(A1,NOW(),"d")
    So does =TODAY()-A2... You just need to reformat the cell containing this formula as General.

    The formula...

    =TODAY()-(A2&"")

    can also be used to prevent Excel from interpeting the formula's results as a datevalue.

    [ This Message was edited by: Mark W. on 2002-08-14 08:00 ]

User Tag List

Like this thread? Share it with others

Like this thread? Share it with others

Posting Permissions

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

 

 
DMCA.com