4 year diff, C-n-P to different wookrbooks (O2K4)

A

anode505

This is for Excel 2004

When I do a Cut-n-Paste of a date from one Excel file to another I either gain or loose 4 years.

I've narrowed it down to just one file being the culprit. If I copy out of it, it gains 4 years. If into it it looses 4 years. Other files to-n-fro seem to be ok.

I'm kinda stumped! I looked at the properties and nothing jumped out. Formats are ok.

I kinda need this, since its used in a macro, then applescript to create a new iCal event.

Help? Ideas? TIA
 
J

JE McGimpsey

This is for Excel 2004

When I do a Cut-n-Paste of a date from one Excel file to another I either
gain or loose 4 years.

I've narrowed it down to just one file being the culprit. If I copy out of
it, it gains 4 years. If into it it looses 4 years. Other files to-n-fro seem
to be ok.

I'm kinda stumped! I looked at the properties and nothing jumped out. Formats
are ok.

I kinda need this, since its used in a macro, then applescript to create a
new iCal event.

It's actually 4 years and 1 day.

The workbook in question is using the WinXL default 1900 date system
while the others are using the MacXL default 1904 date system.

You can change systems in Preferences/Calculation (check or uncheck the
1904 date system checkbox).

XL stores dates as integer offsets from the base date, so 4, for
example, will be displayed as 5 January 1904 (4 days after the 1/1/1904
base date) in the 1904 system, and as 4 January 1900 (4 days after the
31 December 1899 base date) in the 1900 system.

If you change the date system to 1904 on your 1900-based workbook, all
your dates will jump by 4 years and a day. You can "convert" them back
by subtracting 1462 (the number of days in 4 years + 1) from the dates.

To do this with a number of dates at once, enter 1462 in a cell, copy
the cell, select the dates, and choose Edit/Paste Special, selecting the
Values and Subtract radio buttons.
 
A

anode505

You da Man!

Thanks a million!

(yeah it was 4 years and 1 day. I'm guessing the day is a leap year day)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top