New C# and the installer tutroial for .Net 4.5 coming soon!

4 03 2014

Since I’ve posted the tutorial on .NET and the installer it has maintained a good following. I believe that this has helped out a lot of you when it comes to personal projects or work questions that you might not have otherwise gotten the answer to without coming here.

Because of this I’m re-writing this tutorial in .NET 4.5 to bring it up to date for those of you struggling to get it work in the newer frameworks. I just wanted to drop a quick note, if you’re having issues getting the current tutorial working just hold up, I’ll have a new one out here soon.

Thanks for the support guys.





Excel 1904/1900 Calendar. Confusing.

11 11 2008

Recently I had quite a fun experience with Excel and Mac/PC compliance. Not only that I found out something that I didn’t even know was possible in Excel. Go figure though, there’s always something weird when it comes to being platform agnostic.

I work with Excel spreadsheets on almost a daily basis, my job is to take that data within those sheets and store it into a SQL database. Usually this goes alright, minus the forumla problems and hidden columns and ceels, although I must admit I’m pretty good at finding all of Excel’s little secrets by now. Last week I was lucky enough to get the worst file I’ve had to deal with yet.

This file just needed to get into the database so that we could finish our job for the day and go home. Easier said then done about 4 hours later! To make a long story short, the Excel file happened to be opened and edited for a little bit on a Mac. The transition from PC to Mac went just fine, but somewhere along the line transferring it back to the PC, we ran into a very interesting problem.

Upon transferring the file into SQL, we were noticing that the dates would come up 1 day 4 years behind what the values actually were. After fudging around the internet I found a few sites that explained it a little more.

Excel on the Mac is defaulted to use the 1904 calendar system; where-as PC is defaulting to the 1900 calendar system. Luckily there is a place where you can change this option, it sounded like a simple fix so I clicked the office button when to excel options and changed it. Perfect! My dates were now displaying correctly, I can import this and go home!

Not so fast… Once imported to SQL, the dates would still come up 1 day 4 years back. So what was the eventual fix? There was some talk about using macro’s to adjust the date, but in reality we could either change all dates to be 1 day 4 years ahead, or we could switch the mac to using the 1900 calendar system.

By this time we didn’t know what date’s were suppose to be the real dates anymore, but finally got it worked out. I guess the lesson here is: make sure that you know what calendar system both the Mac and the PC are using before you transfer Excel files across them. You don’t want to end up with a 60 thousand line file and have to change all the dates back by hand!

Another day… Another challenge.