I have the following code in C#:
DateTime dt = GetDateTime();
string formatted = dt.ToString("yyyyMMddTHHmmsszz");
which returns a date in the following format:
20100806T112917+01
I would like to be able to get the same results in VBScript (for a legacy ASP application). It is especially important that I get the UTC offset information, or have the time converted to UTC.
How do I do that?
For date formatting, I like using the .NET StringBuilder class from VBScript:
The above returns:
This assumes that you have .NET installed on your web server.
Here's my own attempt. Better solutions will be graciously accepted!