Link to home
Start Free TrialLog in
Avatar of OwenParry
OwenParry

asked on

Excel dates off by 4 years

I have been sent an Excel file which contains some dates in 2 columns.  On visual inspection, the date values are correct in the sense that someone's date of birth matches a record we already have for them.

However, when I process the spreadsheet (using an ASP script but this also happens with a simple copy and paste to a new spreadsheet), the dates are all changed by 4 years and 1 day smaller.

The format of the column shows the expected DD/MM/YYYY (British English) format and locale - the file originated in the Republic of Ireland.

I'm at a loss as to how this can happen and how I can correct it for the future.
ASKER CERTIFIED SOLUTION
Avatar of Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Ingeborg Hawighorst (Microsoft MVP / EE MVE)
Flag of New Zealand image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of OwenParry
OwenParry

ASKER

Many thanks - just the thing
OwenParry,

The chances are the original dates were entered using Apple's base date which was 1904 (the first day that is supported is January 1, 1904) rather than Excel's normal base date of 1900 (the first day that is supported is January 1, 1900) - thus the difference of 4 years.

Ref: http://support.microsoft.com/kb/180162

Patrick
ps. The difference of 4 years and a day is accounted for by leap years - or absence of them - plus the different datal systems.
Thanks - we don't support Macs here so none of us had come across the difference.
>Thanks - we don't support Macs here so none of us had come across the difference.

I understand that however Excel can work with either datal system as teylyn has indicated in comment ID:34941864.

Patrick