Results 1 to 8 of 8

Convert dates in 'dd/MM/yy' format to 'MMM-YY'. Excel returns wrong year

Threaded View

  1. #1
    Registered User
    Join Date
    01-29-2013
    Location
    Johannesburg
    MS-Off Ver
    Excel 2007, 2010, 2013, 2016
    Posts
    4

    Question Convert dates in 'dd/MM/yy' format to 'MMM-YY'. Excel returns wrong year

    Hi

    I have a column "A" in a table with dates in my country format "dd/MM/yy".
    in the column "B" I want to have the dates in the previous column in the format "MMM-YY", so I can display the data in a pivot table.

    so I used a loop in VBA with 'Format('cellInColumn_A', "MMM-YY")' to fill column "B"
    For some reason, Excel returns the wrong year in the "MMM-YY" format:

    "A" -> "B"
    Date -> "MMM-YY"
    13/01/15 -> (15/01/16) shows 'Jan-16'
    01/01/15 -> (15/01/16) shows 'Jan-16'
    25/08/15 -> (15/08/16) shows 'Aug-16', etc, etc

    I have tried to change the date format to "dd/MM/yyyy" to enforce the year, but the result is the same.

    What am I doing wrong?
    Thanks
    Luis
    Last edited by luis_vxd; 01-12-2016 at 02:58 AM.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. [SOLVED] Convert date from string, some dates coming out wrong
    By Uther_d_dragon in forum Excel Programming / VBA / Macros
    Replies: 5
    Last Post: 03-04-2014, 10:02 AM
  2. [SOLVED] Excel 2010 returns wrong .Shapes property values
    By FORTRANguru in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 02-12-2014, 01:01 AM
  3. Macro pastes dates in wrong format.
    By RoddersW in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 12-30-2013, 12:23 PM
  4. Convert Dates in 2011:08:17 format into Dates in Excel
    By JessRI in forum Excel - New Users/Basics
    Replies: 12
    Last Post: 09-11-2012, 09:55 AM
  5. VBA to convert 1930-1999 year format to year 2000 format
    By maacmaac in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 11-09-2011, 04:54 PM
  6. [SOLVED] Excel assumes wrong year when year omitted
    By CircleSky in forum Excel General
    Replies: 3
    Last Post: 06-12-2006, 05:20 PM
  7. how do I convert a dates in a year quarters in a year?
    By Linndek in forum Excel General
    Replies: 5
    Last Post: 05-11-2006, 10:35 AM
  8. [SOLVED] Convert Dates into four digit YEAR ONLY
    By Richard in forum Excel General
    Replies: 8
    Last Post: 01-31-2005, 05:06 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