Press "Enter" to skip to content

nuxx.net Posts

Microsoft Excel Date Munging: 1900 vs. 1904 Date System

While working on migrating data for the upcoming MMBA Chapter Transition one of my tasks was to export membership data, split it into chapters, then sent it off to IMBA for import into their membership system. After getting the information out of the database I used my Mac to create one large spreadsheet with all the requisite fields covering the entire state (including a chapter column) and sent it around to all interested parties for confirmation that it looked fine. The next step was to break it out into per-chapter data so this time I sat down at my PC, opened the file, filtered on each chapter, selected everything displayed, copied the data, created a new file, pasted the data, saved the now per-chapter data, and sent it off to IMBA.

A couple weeks later, once the files had been pulled into IMBA’s systems, I received a few notes questioning the data as some chapters listed only single-digit counts of active members whereas they were known to have exponentially more. Checking over my data I found that the per-chapter spreadsheets were wrong, and that the date columns had been decremented by a good deal rendering most active memberships expired. For example, on my personal row the expiration date of 6/29/2012 became 6/28/2008.

After a bit of investigation I learned about the toggle shown above to set Excel documents to use the 1904 Date System, and this turned out to be a big key to figuring out the problem. As documented here in Microsoft KB article 180162, when I’d first created the spreadsheet on Mac the file was set to use the Office for Mac default of 1904 Date System and the populated with the accurate data. Opening the file on PC retained this 1904 setting and displayed the data correctly, but when the new file was created with the PC default the 1900 Date System and data pasted into it became offset by roughly four years. I’d presumed that the copy/pasted data would be the same and with the first few columns in each sheet looking correct I didn’t check the rest, and files with incorrect expiration data were thus sent off to IMBA.

The real reason for this goes a bit deeper and involves how Excel stores dates. Specifically, dates are stored as a numerical offset (called a serial number in Excel) from a starting point in time (an epoch). Toggling between the 1900 Date System and 1904 Date System changes the epoch, but as date fields copied and pasted between sheets are copied as their serial number, if the epoch changes the displayed date will be different. The data behind the scenes doesn’t change, but the information presented to the user does. See Microsoft KB article 180162 for a more detailed explanation of why this occurs.

I understand all of the reasons why this works as it does (legacy compatibility with Mac vs. PC, the use of a serial number + epoch so that all international date formats are easily handled, etc) but in some edge cases (such as what I ran into) the result for the end user is maddening.

Leave a Comment

Logpile!

Here, have a photo of the newest addition to the trails at River Bends: a log pile. This has been in place for a few days, but this afternoon I finished it off by adding another log to the front to make it more approachable. I also added more glue dirt to help keep it all together. Another view of the logpile (from the direction which it is typically ridden) can be seen here. At River Bends when the parks people cut downed trees from the two track, they tend to leave nicely maneuverable ~4′ pieces sitting in the woods along the trail. Finding a few fresh, non-rotted ones of these is trivial and they can easily be used to build solid log piles. For anything else I can find other fallen, dead trees and cut them to length with a handsaw.

This afternoon’s trailwork also included tweaking a corner to increase its radius (photo) and adjusting another to flow more smoothly to cut down on people overshooting the corner and washing out. Damage to both the trail surface and edge made it obvious that this was a common problem on these corners. Here is a helmet cam video of me washing out on the pictured corner and falling. Whoops.

Leave a Comment

World’s Largest 555 Timer?

This traffic control device (which is essentially a timer) may just be the world’s largest 555 timer.

This was seen at the corner of 22 Mile and Shelby Roads while on a bike ride this evening. I headed from home, up to River Bends, out the back part of it, over through Clinton River Park Trails (which were rather muddy), and then wound through neighborhoods back towards home. Total of 22.3 miles in 1:44:27.

Leave a Comment

Doughnuts at Paint Creek Cider Mill

…just a quick photo from yesterday’s impromptu bike ride from when we stopped at Paint Creek Cider Mill and split a bag of cinnamon sugar doughnuts about 30 miles into riding. As Nick said, due to five people being present and a dozen doughnuts in the bag, a few of us had to “take one for the team” and eat three… Mmm…

Yesterday’s weather could have been a little nicer as sprinkling rain was a little was a little unpleasant at times, but otherwise it was a nice cool autumn day. I’m really looking forward to a couple months of this type of ideal riding weather.

Leave a Comment

River Bends Trailhead Kiosk: Complete

This morning, along with help from Jeremy Verbeke and Scott Retford (and Bob Costello last night in collecting the Lexan) the kiosk at the River Bends Trailhead was completed. This involved hanging the signs, covering it all with Lexan, and fitting some wooden strips that I cut and drilled last night (picture). Here is a photo of Scott and Jeremy standing next to the kiosk right after we completed the sign hanging.

This kiosk (along with much of the trail signage) was donated and build by Spencer Wood and Troop #242 as part of Spencer’s Eagle Scout project. It’s a nice improvement on the standard MMBA Kiosk Construction Plans, is extremely well built, and should last for years. This is one of the best constructed trailhead kiosks that I’ve seen.

The signage includes a trailhead-specific version of the map, a QR code allowing easy download of a PDF of the map to one’s smart phone, and some basic trail rules. The kiosk also features a sign from Aktion Club, a Kiwanis program for people with disabilities who helps with maintenance of the first mile of two track trail.

This completes the current River Bends trail system allowing us to move on to the next phase. I just recently received approval to expand the single track even further, so once the mosquitos start dying off and leaves start falling from trees construction on this next segment can begin.

6 Comments

Garmin Edge 500 Distance Aliasing Issues Alleviated By GSC 10 Sensor

Past experience with wildly varying data has prevented me from trusting GPS-based devices for accurately logging distances while riding mountain bike trails, but after hearing reassuring reports of modern units and seeing how useful it could be to have one unit logging data for all three of my bikes and automatically aggregating it I decided to give it a go. I purchased a Garmin Edge 500 cycling computer and a GSC 10 wheel speed / pedaling cadence sensor a month ago and after beginning to use it things seemed quite accurate, but I continued to be a bit suspicious that it may not be providing as accurate of data as it could. So, I decided to do some tests.

The results of these tests have shown that when the Edge 500 is used in conjunction with the GSC 10 it is just as accurate as a wheel-based computer and can be relied on to provide sufficiently accurate distance measurements while riding curvy mountain bike trails. Coupled with all the extra data that the system can log (heart rate, location, temperature, cadence, etc) it’s quite a nice system for recording data.

Without the GSC 10 (using only GPS-based data recording) the Edge 500 showed drastic undermeasurement, 20.70% on a typical Southeast Michigan trail ride and 33.87% in a worst-case test scenario.

16 Comments

iTunes 10.4.1 UI Bug

There is a UI bug in iTunes 10.4.1 which causes the rewind (<<) button to become highlighted when switching to the Mini Player. This causes unexpected behavior when one Cmd-Tabs to iTunes and presses space intending to pause the music. To replicate this issue do the following: - Bring the normal iTunes window to the foreground. - Note that the Play / Pause button is highlighted. If it's not, press Tab to move the highlight to it. - Double-click a track to begin it playing. - Click the + or press Shift+Cmd+M to switch to Mini Player. - Note that the rewind (<<) button is now highlighted instead of the Play / Pause button. This was tested with iTunes 10.4.1 on OS X 10.7.1. UPDATE: This appears to finally have been fixed in iTunes 10.5.3.

1 Comment

Odell Brewing Company’s Myrcenary Double IPA

Tonight beer, being sipped while writing this post and some research into a particular GPS-based bike computer, is Odell Brewing Company’s Myrcenary Double IPA. This is very much a slow-sipping super-hoppy beer, exactly the kind that I love to spend two hours with while working on personal projects in the evening.

This bottle of beer is the last one of the outstanding selection of Colorado beers brought back by some friends on a recent trip to Colorado.

Leave a Comment

Broken Spoke II

Today I broke another spoke; the same one that was quickly fitted as a replacement before the Hanson Hills XC race by a guy from Grayling’s The Bicycle Shop. I guess 2.5 months of riding on a quick (and much appreciated) fix isn’t too bad. The wheel is wobbling a bit so I won’t be riding this bike until I can get it fixed up.

I was surprised by how it broke. Much like the last time I was riding along pretty trivial single track, a short and relatively smooth uphill section at Stony Creek and not going over anything more difficult than a front lawn. Suddenly I heard a BANG sound, stopped to look at the wheel, and saw one end of a spoke hanging into the center near the hub.

Oh well, that’s life I guess. I can’t complain too much, as I’ve got at least 2466 miles (likely more, as not all were logged) on these wheels. I’ve got some 291mm spokes here from building up a wheel set back in April. DT Swiss’ Spoke Calculator is recommending a 293mm spoke, but hopefully I’ll be able to make do with something 2mm shorter.

UPDATE: The replacement spoke did the trick. Wheel’s held up for ~30 miles thus far.

1 Comment