INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: Date Field Bug  (Read 2308 times)

Gl3nn

  • Galactic Citizen
  • ****
  • Posts: 384
Date Field Bug
« on: October 19, 2011, 11:21:43 pm »

When entering a date of 1/1/1895, MC changes it to 1/2/1895.  Several other 18-- dates are the same.
Logged

bunglemebaby

  • Galactic Citizen
  • ****
  • Posts: 469
Re: Date Field Bug
« Reply #1 on: October 20, 2011, 07:27:14 am »

That is certainly odd. Just out of curiosity... how many files from the 1800's do you have in your collection??  :P
Logged

Gl3nn

  • Galactic Citizen
  • ****
  • Posts: 384
Re: Date Field Bug
« Reply #2 on: October 20, 2011, 09:24:23 am »

Only takes 1 to be a bug!

Old photos I'm cataloging.  Somehow, it's not quite New Year's Day on 1/2...  :P
Logged

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Date Field Bug
« Reply #3 on: October 20, 2011, 12:19:30 pm »


Unfortunately, that is not possible. Only the standard date fields have this conversion logic. Internally MC uses always this "seconds since January 1st, 1970" system.

Is this still the case? If so, I understand the need to have the day and month filled in (usually as "1") as you need to generate a single number in seconds since 1/1/1970
If not, ideally I'd like to be able to just enter the information I actually know (ie JUST the year or JUST the year & month)

That system is used with the Date Imported, Date Modified and Date Created fields. The Date field is stored in the following format.


The Date field seems to be a day counter.

- the number 1 represents December 31st, 1899
- the current date is 39124 (February 11th, 2007)
- December 30th, 1899 would be zero but that is not possible with the used logic and MC doesn't accept this value.
- December 29th, 1899 and older dates use negative numbers starting from -1
- if only the year number is inserted in the Date field MC stores the date as January 1st of that year.


I tried to find a reason for the odd looking December 31th, 1899 date. Why isn't it January 1st, 1900? Looks like this is the explanation:

And finally, why 30 December 1899? Why not, say, 31 December 1899, or 1 January 1900 as the zero day? Actually, it turns out that this is to work around a bug in Lotus 1-2-3! The details are lost in the mists of time, but apparently Lotus 1-2-3 used this date format but their devs forgot that 1900 was not a leap year. Microsoft fixed this bug by moving day one back one day.

That blog explains some other date related oddities too.


The numbers after the dot are just digits after the decimal point. For example,
37808.5 results 7/6/2003 12:00 PM  and  39232.618055555555 results 5/30/2007 2:50 PM



I have not tested this again, but I assume that also this bug still exists (the line in red), i.e. "December 30, 1899" does not work.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Alex B

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 10121
  • The Cosmic Bird
Re: Date Field Bug
« Reply #4 on: October 20, 2011, 07:25:20 pm »

I just tested the above mentioned dates and I can reproduce both problems on MC16 and MC17.

January 1, 1895 changes to January 2, 1895 and December 30, 1899 just clears the date field value.

EDIT

Also the hours and minutes do not seem to work at all when the internal date code has a negative value. The typed hour and minute values do not stick. Starting from December 31, 1899, 00:01 AM they work.
Logged
The Cosmic Bird - a triple merger of galaxies: http://eso.org/public/news/eso0755

Gl3nn

  • Galactic Citizen
  • ****
  • Posts: 384
Re: Date Field Bug
« Reply #5 on: October 21, 2011, 09:45:40 am »

Thanks, Alex.  Seems like the issue's been around for awhile.

Any chance for a fix in v16?  Jim?  Matt?
Logged

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72443
  • Where did I put my teeth?
Re: Date Field Bug
« Reply #6 on: October 21, 2011, 09:58:48 am »

Probably not in MC16.  We will only fix major bugs in MC16 now, if any are found.
Logged
Pages: [1]   Go Up