ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Worksheet Functions (https://www.excelbanter.com/excel-worksheet-functions/)
-   -   permanent conversion of 1904 date format to 1900 date format (https://www.excelbanter.com/excel-worksheet-functions/237505-permanent-conversion-1904-date-format-1900-date-format.html)

Jos

permanent conversion of 1904 date format to 1900 date format
 
I have an old spreadsheet in Windows that has the 1904 date format as basis.
All my other spreadsheets are in the 1900 date format. Are there any
utilities that can permanently convert a spreadsheet from the 1904 to the
1900 date format?

Harlan Grove[_2_]

permanent conversion of 1904 date format to 1900 date format
 
Jos wrote...
I have an old spreadsheet in Windows that has the 1904 date format as basis.
All my other spreadsheets are in the 1900 date format. Are there any
utilities that can permanently convert a spreadsheet from the 1904 to the
1900 date format?


There's no such thing as permanent conversion.

I'm not aware of any utilities that would do this, but it's fairly
easy to use a macro to do this. Basically, the macro would open a
workbook, check if the workbook is using the 1904 date system, and if
so change it to the 1900 date system and iterate through all used
cells in all worksheets checking for cells containing constant dates
(the cell's .HasFormula property would be FALSE while its .Value
property would be type Date and have value 1), and when constant
date values were found, add 1462 to them.

Gord Dibben

permanent conversion of 1904 date format to 1900 date format
 
I don't know of any utilities but subtracting 1462 from each 1904 date will
give you a 1900 date.

Helper column with =A1-1462 will convert.

Or enter 1462 in an unused cell.

Copy that cell then select the range of date cells and Paste
SpecialSubtractOKEsc.


Gord Dibben MS Excel MVP

On Mon, 20 Jul 2009 16:32:05 -0700, Jos
wrote:

I have an old spreadsheet in Windows that has the 1904 date format as basis.
All my other spreadsheets are in the 1900 date format. Are there any
utilities that can permanently convert a spreadsheet from the 1904 to the
1900 date format?



Harlan Grove[_2_]

permanent conversion of 1904 date format to 1900 date format
 
Gord Dibben <gorddibbATshawDOTca wrote...
I don't know of any utilities but subtracting 1462 from each 1904 date will
give you a 1900 date.


You want to *ADD* 1462 to 1904-system dates to make them 1900-system
dates.

Think about it for a minute or two.

Then try testing.

Agostino Banchi

I had the same problem and I did not find any solution on internet.
So I wrote this procedure.

Sub Y1904()

For Each Sht In ActiveWorkbook.Sheets
Set Rng = Sht.UsedRange
For Each cell In Rng
If cell.HasFormula = False Then
If IsDate(cell.Value) Then
cell.Value = cell.Value + 1462
End If

End If

Next
Next
End Sub

Basically it adds to all cells containing a date (not formula) the 1462 value.


All times are GMT +1. The time now is 10:13 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com