Subscribe Bookmark RSS Feed

Date and Time not matching

bents

Community Trekker

Joined:

May 28, 2013

So I've run into a slight problem.  I'm importing data from a transmitter and from a computer that logged test information.  The first section of the JMP log output is information pertaining to the first row in the transmitter data.  It prints the date, the date+time in raw seconds, the date+time in date format, the raw seconds column, and the time difference between the date+time and the raw seconds column.  Aside from the time difference between the Date+Time and the Raw Seconds columns everything is ok and I have a function which corrects that difference.

"Date 15Feb2013"

"Date and Time 3443759146"

"Date and Time 15Feb2013:07:45:46"

"Raw Seconds 3443780746"

"Time Diff variable: -21600"

Now we get to the problem.  The following output is from the log data.  Again I had it print the date, date+time in raw seconds, and the date+time in date format.  The problem as you can see is the date being imported shows Feb 15th 2013 which is correct but the raw seconds from adding the date and time is equal to Feb 15th 2009.  How does this happen?  And, do you guys have any idea of how to fix it?  The log data and the transmitter data do not necessarily start at the same time (there is usually anywhere between a 5 min difference to an hour difference).

"Date 15Feb2013"

"Date and Time 3317528884"

"Date and Time 15Feb2009:07:48:04"

1 ACCEPTED SOLUTION

Accepted Solutions
Solution

That discrepancy of exactly 1461 days reminds me about sharing MS Excel files between Mac and Windows users.

If your process involves mixed platforms (and a microsoft product) you can just add (4*365+1)*60*60*24 to the raw seconds to correct for the difference in reference date.

(The +1 is rumored to have it's origin in MicroSoft being unaware of that 1900 was one of those rare years with omitted leap day in the gregorian calender)

2 REPLIES
Solution

That discrepancy of exactly 1461 days reminds me about sharing MS Excel files between Mac and Windows users.

If your process involves mixed platforms (and a microsoft product) you can just add (4*365+1)*60*60*24 to the raw seconds to correct for the difference in reference date.

(The +1 is rumored to have it's origin in MicroSoft being unaware of that 1900 was one of those rare years with omitted leap day in the gregorian calender)

bents

Community Trekker

Joined:

May 28, 2013

Yep that must be it.  I was using some excel files someone had made out of the extension-less log files.  I went back, found the original files, and converted them to *.txt and the 4 year gap is now gone.  Thank you very much for getting me on the right track.