1 (edited by Janet Simkin 14-09-2011 12:23:44)

Re: 1904 date system in spreadsheets

I have just spent two days correcting the dates on records imported from spreadsheets that had the 1904 date system set. They were all copies of our standard excel spreadsheet that uses the windows standard 1900 date system but had been used on a Mac, and when saved the Mac unhelpfully changed the date system to its default of 1904. The dates still showed correctly in the spreadsheets when I got them but were imported to R6 as four years and a day earlier.

As more people seem to be using Macs and we can't rely on me noticing or them always remembering to override the default,  could a future release of R6 check the date system used before importing the spreadsheet and adjust if necessary?

I really don't want to go through this again!

Janet

Janet Simkin
British Lichen Society

2

Re: 1904 date system in spreadsheets

Hi Janet,
To save me fiddling around trying to setup a test case, can you send me an example please so I can try it out.
Thanks

John van Breda
Biodiverse IT

3

Re: 1904 date system in spreadsheets

Hi Janet
I'm afraid on further investigation this particular issue does not look easy to fix as I had hoped. The Excel import is handled by a third party component which does not seem to be aware of the date format differences between the 1904 and 1900 dates. Presumably there is some flag in header information of the XLS file which is supposed to set the date format to 1904 but is being ignored.

I will log this issue though I am not sure whether it justifies more time spent on it given the other issues that need to be addressed. Meanwhile if anyone is an expert in XLS file format handling then let me know!

Best wishes

John van Breda
Biodiverse IT

4

Re: 1904 date system in spreadsheets

Thanks for looking into this, at least we now know what is happening and can look out for it in future.

Janet

Janet Simkin
British Lichen Society

5

Re: 1904 date system in spreadsheets

johnvanbreda wrote:

Meanwhile if anyone is an expert in XLS file format handling then let me know!

(I'll probably be banned for this, but..)

The following link gives a very good overview of dates in the excel file format https://secure.simplistix.co.uk/svn/xlrd/trunk/xlrd/doc/xlrd.html

and then there is open offices docs on the excel file format http://sc.openoffice.org/excelfileformat.pdf - enjoy!

Charlie Barnes
Information Officer
Greater Lincolnshire Nature Partnership

6

Re: 1904 date system in spreadsheets

Hi - I rarely coem across the 1904 date format now.  The main issue is that is was for a long time the default date format in Mac Excel, not PC excel, and in the format cells bit of excel on a PC you can now set it to be one or other, AS DISPLAYED.  But, as these dates are essentially an integer of number of days since either 01/01/1901 or 01/01/1904, that is not changed, and, I think what recorder reads is the integer behind the formatting.  It is not easy to spot in excel - usually only noticed when imported records are all 1462 days wrong!  (ie 4 years out) - easy to notice if you have an earliest date cut-off in yoru survey, as the records get rejected.

I have always checked the date in records received by converting a few of the date cells to the integer format (clear formatting right click) to display the number, compared to the correct version on a spreadsheet which you know is correct.

If Ihave to change the dates, I remove the formatting of all the dates, so that they are just integers, then add1462 to that integer and re-convert to date format.

Simple! (but annoying).  I am slowly educating the last few remaining observers who have old -school habits such as this and finding it less and less of an issue

Louise, CPERC


Janet Simkin wrote:

Thanks for looking into this, at least we now know what is happening and can look out for it in future.

Janet

7

Re: 1904 date system in spreadsheets

Thanks Charlie - much appreciated!

John van Breda
Biodiverse IT