+ Reply to Thread
Results 1 to 5 of 5

Convert dd/mm/yyyy DATE >> to mm/yyyy TEXT

  1. #1
    Registered User
    Join Date
    03-21-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010+
    Posts
    2

    Convert dd/mm/yyyy DATE >> to mm/yyyy TEXT

    I want to use parse data in a piviot table by months. The data is in the format of dd/mm/yyyy. Changing the date format to mm-yy does not change the date serial number and the pivot table still sees the individual days. I need to either convert the date code to mm/yyyyy or change the format from date to text. I'd settle for either solution.

    Thanks

  2. #2
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Convert dd/mm/yyyy DATE >> to mm/yyyy TEXT

    Hi and welcome to the forum

    As you have seen, all formatting does to a cell is change the appearance of the data, it does not change that actual contents of the cell. If you want to extract the month number from a date, then use =MONTH(cell-ref). This will give you a numeric value from 1-12

    You can also use =year() to extract the year, then combine =year(cell-ref)&month(cell-ref)
    Note, this will give you a text answer, to convert that to a numerics...
    =(YEAR(cell-ref)&MONTH(cell-ref)*1
    Last edited by FDibbins; 02-05-2014 at 09:20 PM.
    1. Use code tags for VBA. [code] Your Code [/code] (or use the # button)
    2. If your question is resolved, mark it SOLVED using the thread tools
    3. Click on the star if you think someone helped you

    Regards
    Ford

  3. #3
    Registered User
    Join Date
    03-21-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010+
    Posts
    2

    Re: Convert dd/mm/yyyy DATE >> to mm/yyyy TEXT

    That worked with a CONCANTINATE(MONTH(A2),"/",YEAR(A2))

    I ended up using this, You are able to make your own - so named "custom" formats.
    Right click follow Fomat cells... then Category: custom write to box Type: mm.yyyy and confirm ENTER.
    You can use also Type: mmmm "-" yyyy

    Or use something like this: =TEXT(A1;"mmmm.yyyy") suppose in cell A1 = 14.1.2014 => result is january.2014
    Or =TEXT(A1;"mmmm - yyyy")

    Thanks for the help.

    Mr.X

  4. #4
    Administrator FDibbins's Avatar
    Join Date
    12-29-2011
    Location
    Duncansville, PA USA
    MS-Off Ver
    Excel 7/10/13/16/365 (PC ver 2310)
    Posts
    52,946

    Re: Convert dd/mm/yyyy DATE >> to mm/yyyy TEXT

    great job

    Based on your last post it seems that you are satisfied with the solution(s) you've received but you haven't marked your thread as SOLVED. If your problem has not been solved you can use Thread Tools (located above your first post) and choose "Mark this thread as unsolved".
    Thanks.

    Also, as a relatively new member of the forum, you may not be aware that you can thank those who have helped you by clicking the small star icon located in the lower left corner of the post in which the help was given. By doing so you can add to the reputation(s) of those who helped.

  5. #5
    Registered User
    Join Date
    03-21-2013
    Location
    Minnesota
    MS-Off Ver
    Excel 2010+
    Posts
    2

    Re: Convert dd/mm/yyyy DATE >> to mm/yyyy TEXT

    Problem [SOLVED]

    is there a button I need to push?

  6. #6
    Forum Guru benishiryo's Avatar
    Join Date
    03-25-2011
    Location
    Singapore
    MS-Off Ver
    Excel 2013
    Posts
    5,147

    Re: Convert dd/mm/yyyy DATE >> to mm/yyyy TEXT

    hi Mr X. if you're using Pivot, you should make full use of its features of dates inside it. use the group function in Pivot table so that you don't have to change the source. right-click any of the cells with dates & click on Group. use Month & Year. This method's "downside" is that you won't be able to format to mmm.yyyy
    but notice that my dates in the file are arranged in order because they are recognized as dates. they go from years, then from Jan to Dec. making them text will not work in this way.

    few things required for it to work
    1. your data source for the pivot cannot have blank rows. mine is A1:B20. so i cannot range A1:B100 where A21:B100 are blanks
    2. dates in column A cannot have blanks. so even if i range A1:B20, A7 for eg cannot be blank
    3. the cells for the date must be formatted as dates

    Problem [SOLVED]

    is there a button I need to push?
    Ford answered this question in post # 4.
    Attached Files Attached Files

    Thanks, if you have clicked on the * and added our rep.

    If you're satisfied with the answer, click Thread Tools above your first post, select "Mark your thread as Solved".

    "Contentment is not the fulfillment of what you want, but the realization of what you already have."


    Tips & Tutorials I Compiled | How to Get Quick & Good Answers

+ 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. Date Function: How to convert MM-DD-YYYY to DD-MM-YYYY
    By ramki in forum Excel Formulas & Functions
    Replies: 7
    Last Post: 04-23-2014, 12:03 AM
  2. [SOLVED] Need date formula to convert mm-dd-yyyy or mm/dd/yyyy to dd-mm-yyyy in 1 formula
    By ChristopherH in forum Excel Formulas & Functions
    Replies: 8
    Last Post: 01-29-2014, 09:07 AM
  3. [SOLVED] How to Convert date format ( DD/MM/YYYY) into MM/YYYY
    By PRADEEPB270 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 01-04-2014, 07:25 AM
  4. [SOLVED] convert MM/DD/YYYY to DD/MM/YYYY while the data format is text
    By Vogelmann in forum Excel Programming / VBA / Macros
    Replies: 10
    Last Post: 10-18-2012, 02:43 PM
  5. [SOLVED] Imported data contains strings dd.mm.yyyy how can I convert to date format dd/mm/yyyy inVB
    By Boormo in forum Excel Programming / VBA / Macros
    Replies: 9
    Last Post: 09-05-2012, 05:48 PM

Tags for this Thread

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