+ Reply to Thread
Results 1 to 3 of 3

VERY Weird Date Format Problem with Macro

  1. #1
    Forum Contributor
    Join Date
    02-18-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2013
    Posts
    197

    VERY Weird Date Format Problem with Macro

    I'm using a macro to copy data from one worksheet to another. It has always worked perfectly until today. For some reason the date in the destination workbook is 1 day and 4 years behind the original.

    It's automatically doing something like this =DATE(YEAR(C2)-4,MONTH(C2),DAY(C2)-1)


    Please Login or Register  to view this content.

    I've tested different workbooks, and different dates, as well as different date formats. I've even tried it on two different computers. I cannot figure this out. Any ideas?

  2. #2
    Forum Guru
    Join Date
    04-13-2005
    Location
    North America
    MS-Off Ver
    2002/XP, 2007, 2024
    Posts
    16,436

    Re: VERY Weird Date Format Problem with Macro

    Isn't 4years + 1 day the difference introduced when you switch between 1900 and 1904 date systems? https://support.microsoft.com/en-us/kb/214330

    Do you know which date system you are currently using, and which date system you should be using?
    Quote Originally Posted by shg
    Mathematics is the native language of the natural world. Just trying to become literate.

  3. #3
    Forum Contributor
    Join Date
    02-18-2014
    Location
    Seattle, WA
    MS-Off Ver
    Excel 2013
    Posts
    197

    Re: VERY Weird Date Format Problem with Macro

    MrShorty, that's exactly what it was. I had never even heard of the 1904 vs 1900 date issue.

    Thanks so much for your help!!

+ 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. Advanced filter by date range, international date format problem
    By Senator685 in forum Excel Formulas & Functions
    Replies: 3
    Last Post: 08-21-2013, 08:16 AM
  2. Getting rid of weird time format 01m 16s
    By rooonik in forum Excel Formulas & Functions
    Replies: 5
    Last Post: 06-29-2013, 11:08 AM
  3. Date format problem in macro output file
    By zaska in forum Excel Programming / VBA / Macros
    Replies: 2
    Last Post: 10-22-2012, 05:26 PM
  4. Macro Changes Date format problem from txt
    By tek9step in forum Excel General
    Replies: 2
    Last Post: 07-06-2009, 09:22 AM
  5. really weird copy macro problem
    By gillrajb in forum Excel Programming / VBA / Macros
    Replies: 0
    Last Post: 06-06-2006, 10:11 AM
  6. Replies: 6
    Last Post: 06-01-2006, 01:20 PM
  7. Weird Excel date formatting problem
    By Ian D in forum Excel - New Users/Basics
    Replies: 2
    Last Post: 10-21-2005, 11:05 AM
  8. Weird Macro Problem
    By Bruce001 in forum Excel Programming / VBA / Macros
    Replies: 6
    Last Post: 08-25-2005, 11:05 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