Converting Year/Month to correct date
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Converting Year/Month to correct date
Thanks Thanks: 0 Likes Likes: 0

  1. #1
    Board Regular
    Join Date
    Apr 2019
    Posts
    58
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Converting Year/Month to correct date

    Would you know what would be the correct formula for converting year/month to correct date. Example: All rows display 2019/01, 2019/02, 2019/03... etc.

    What I really need is to have the date listed as, "01/2019".

    I tried to use "Text to Columns" and Format cells, DATE. I remain with date errors #VALUE ! on Column rows.

  2. #2
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    27,051
    Post Thanks / Like
    Mentioned
    461 Post(s)
    Tagged
    46 Thread(s)

    Default Re: Converting Year/Month to correct date

    Did you select YMD when you used Text2columns?
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  3. #3
    Board Regular
    Join Date
    Apr 2019
    Posts
    58
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Converting Year/Month to correct date

    Yes, i did. I am currently utilizing MS Excel 2016


    Quote Originally Posted by Fluff View Post
    Did you select YMD when you used Text2columns?

  4. #4
    Board Regular
    Join Date
    Apr 2019
    Posts
    58
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Converting Year/Month to correct date

    I also tried: =YEAR(B3), and, I get #VALUE ! error

    Quote Originally Posted by Unicode View Post
    Yes, i did. I am currently utilizing MS Excel 2016

  5. #5
    MrExcel MVP
    Moderator
    Fluff's Avatar
    Join Date
    Jun 2014
    Location
    Chippenham
    Posts
    27,051
    Post Thanks / Like
    Mentioned
    461 Post(s)
    Tagged
    46 Thread(s)

    Default Re: Converting Year/Month to correct date

    If you put =LEN(B3) into a cell where B3 conatins 2019/01 what does it say?
    - Posting Data try one of these tools
    - Posting guidelines, forum rules and terms of use
    - Read the FAQs

    Running Office 365 on Win 10

  6. #6
    Board Regular
    Join Date
    Apr 2019
    Posts
    58
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Converting Year/Month to correct date

    I tried =LEN(B3), I get 1/7

    Quote Originally Posted by Fluff View Post
    If you put =LEN(B3) into a cell where B3 conatins 2019/01 what does it say?

  7. #7
    Board Regular
    Join Date
    Apr 2019
    Posts
    58
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Converting Year/Month to correct date

    I just tried again, Text to Columns, and I get:
    Jan-19
    2/1
    3/1
    4/1
    5/1
    6/1
    7/1
    8/1
    9/1
    10/1
    11/1
    12/1


    Quote Originally Posted by Unicode View Post
    I tried =LEN(B3), I get 1/7

  8. #8
    MrExcel MVP
    Junior Admin
    Joe4's Avatar
    Join Date
    Aug 2002
    Posts
    50,456
    Post Thanks / Like
    Mentioned
    54 Post(s)
    Tagged
    11 Thread(s)

    Default Re: Converting Year/Month to correct date

    I just tried again, Text to Columns, and I get:
    Jan-19
    2/1
    3/1
    4/1
    5/1
    6/1
    7/1
    8/1
    9/1
    10/1
    11/1
    12/1
    That implies that it successfully converting them to dates.
    Now, just apply a Custom Format of "mm/yyyy", and you should be all set.
    TIPS FOR FINDING EXCEL SOLUTIONS
    1. Use the built-in Help that comes with Excel/Access
    2. Use the Search functionality on this board
    3. A lot of VBA code can be acquired by using the Macro Recorder.

    "Give a man a fish, feed him for a day. Teach a man to fish, feed him for life!"

  9. #9
    MrExcel MVP Rick Rothstein's Avatar
    Join Date
    Apr 2011
    Location
    New Jersey, USA
    Posts
    35,117
    Post Thanks / Like
    Mentioned
    92 Post(s)
    Tagged
    33 Thread(s)

    Default Re: Converting Year/Month to correct date

    Quote Originally Posted by Unicode View Post
    Would you know what would be the correct formula for converting year/month to correct date. Example: All rows display 2019/01, 2019/02, 2019/03... etc.
    Noting that you are looking for a formula solution...

    Those are Text strings, not dates. If you wanted the correct display (still Text, not real dates), you could use this formula...

    =MID(A1&A1,8,7)

    If you wanted real dates (you would have to custom format the cells to make them look the way you want), you could use this formula (note the dates would be the 1st of the month)...

    =0+SUBSTITUTE(A1&"-01","/","-")
    Rick's "mini" blog... http://www.excelfox.com/forum/f22/
    .
    Want to post a small screen shot? See Part B here.

  10. #10
    Board Regular
    Join Date
    Apr 2019
    Posts
    58
    Post Thanks / Like
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Default Re: Converting Year/Month to correct date

    Custom format worked just fine. Thank you!


    Quote Originally Posted by Joe4 View Post
    That implies that it successfully converting them to dates.
    Now, just apply a Custom Format of "mm/yyyy", and you should be all set.

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
  •