You can easily change the default culture (which controls date/time formatting) in the Page directive or web.config. But you can’t easily set the date/time format to a custom value without editing the localization settings on the web server itself. If you don’t have access to this, or if you want to more easily deploy your application without changing system settings, you can use code like this. Feel free to copy and paste. Replace the literal strings with the appropriate call to ConfigurationManager.AppSettings if you’d like to use web.config.

        protected void Application_BeginRequest(object sender, EventArgs e) {
            var activeThread = System.Threading.Thread.CurrentThread;
                var culture = new CultureInfo("en-US");
                    var timeFormat = new DateTimeFormatInfo();
                    timeFormat.ShortDatePattern = "ddd MMM dd";
                    timeFormat.LongDatePattern = "ddd MMM dd h:mm tt";
                culture.DateTimeFormat = timeFormat;
            activeThread.CurrentCulture = culture;
        }

I wrote a quick tool today that converts JPEG, GIF, PNG, TIFF, and BMP images into WDP format, otherwise known as JPEG-XR, Windows Media Photo, or HD Photo. Since I’m not aware of an existing tool that does the same, I am making it available as freeware on an AS-IS basis.

How to use: Start jpg2wdp. Drag and drop files from Explorer onto the toolwindow. WDP files are created in the same folder as the original images.

Requires: WPF/.NET Framework 3.5.

The source is not available at this time, since it’s a bit of a mess. Feel free to decompile if you are so inclined.

The other day I installed Office 2010 for someone, after a clean installation of Windows 7. Everything was working just fine except when I installed BlackBerry desktop manager, it refused to recognize Outlook 2010 as a valid Personal Folders source. I don’t remember the exact error message, something like it couldn’t find a valid data store, but it certainly wasn’t working. BlackBerry support offered no assistance as Office 2010 isn’t released yet, and I didn’t want to wait for an answer on the Microsoft Connect newsgroups.

Anyways, the solution turned out to be to first install an older version of Office, sync the BlackBerry once, and then upgrade Office 2010, not using the automatic upgrade, but by choosing the manual option and simply checking all the checkboxes. The BlackBerry now happily works with Office 2010, and my colleague is happily syncing away.

, ,

Something I will have to try out later…

,