Formatting date and time

Uses .NET's formatting strings to format date/time. This reproduces an MSDN sample originally in C#.
Anonymous