Results 1 to 7 of 7

Thread: adding date using date() function

  1. #1
    Board Regular
    Join Date
    Mar 2016
    Posts
    1,436
    Post Thanks / Like
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Default adding date using date() function

    Hi
    I have in cell A1=1/1/2019 and I want to add 1 year to that date. So I did this B1 = A1+date(1,0,0) but I got wrong answer

    01/01/2019 02/12/2019

    Any idea why? I thought I should get 1/1/2020. Thank you very much.

  2. #2
    Board Regular James006's Avatar
    Join Date
    Apr 2009
    Posts
    3,587
    Post Thanks / Like
    Mentioned
    19 Post(s)
    Tagged
    1 Thread(s)

    Default Re: adding date using date() function

    Hi,

    You could test

    = Edate(A1,12)

    Hope this will help

  3. #3
    Board Regular
    Join Date
    Mar 2016
    Posts
    1,436
    Post Thanks / Like
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Default Re: adding date using date() function

    Thank you that helps in that example but lets say if I want to add 1 year, 2 month, 3 days to a date. Can it be done using one function? Thank you once again

  4. #4
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    29,068
    Post Thanks / Like
    Mentioned
    483 Post(s)
    Tagged
    48 Thread(s)

    Default Re: adding date using date() function

    How about
    =EDATE(A1,14)+3
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  5. #5
    MrExcel MVP Jonmo1's Avatar
    Join Date
    Oct 2006
    Location
    Bryan, TX
    Posts
    44,061
    Post Thanks / Like
    Mentioned
    19 Post(s)
    Tagged
    0 Thread(s)

    Default Re: adding date using date() function

    Quote Originally Posted by lezawang View Post
    lets say if I want to add 1 year, 2 month, 3 days to a date.
    Try

    =DATE(YEAR(A1)+1,MONTH(A1)+2,DAY(A1)+3)
    Use the MrExcel HTML Maker to post nicely formatted tables in your forum posts.
    Find a link in post number 31

    The more we learn, and the better we get at our trade, the easier it becomes to overlook the obvious.

    Life moves pretty fast. If you don't stop and look around once in a while, you could miss it.
    Ferris Bueller A.K.A. John Hughes, 1986

  6. #6
    Board Regular
    Join Date
    Mar 2016
    Posts
    1,436
    Post Thanks / Like
    Mentioned
    7 Post(s)
    Tagged
    0 Thread(s)

    Default Re: adding date using date() function

    Thank you all. I got it. Very nice to see different styles. Thank you.
    Last edited by lezawang; Oct 20th, 2019 at 10:38 AM.

  7. #7
    Board Regular James006's Avatar
    Join Date
    Apr 2009
    Posts
    3,587
    Post Thanks / Like
    Mentioned
    19 Post(s)
    Tagged
    1 Thread(s)

    Default Re: adding date using date() function

    For sure ... problem is solved ...

Some videos you may like

User Tag List

Tags for this Thread

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
  •