Fog Creek Software
Discussion Board

Welcome! and rules

Joel on Software

Date Format

I want my date to be displayed like this.
2003/08/04 15:08:12 JST
How to do it.?. I dont want to get each item individually and concatenate it. Is there any other way of doing it using CultureInfo class

Friday, August 6, 2004

What you're describing is:

Short date pattern +
Long time pattern +
Textual Timezone

The problem is the Textual Timezone information. That's not one of the available fields. If you were happy with offsets:

2003/08/04 15:08:12 +01:00

Then you could do that using:

Console.WriteLine(DateTime.Now.ToString("%G zzz"));

Brad Wilson (
Friday, August 6, 2004

Look into the DateTimeFormatInfo class - it allows you to apply custom formatting patterns, and have dates formatted as specified be recognized as valid dates.

Greg Hurlman
Friday, August 6, 2004




don't know if you can get the name of the timezone from that however, but +8/+08/+08:00 (or whatever JST is) is easy.

Friday, August 6, 2004

To Wizards:

As for the topic of choosing what Date Format should I use for your project, I have an alternative way of providing the user with 48 to 60 date formats to choose from - and there is a wide assortment to choose from.

I have put together a package that will do just that and do more.  If interested, go to
Even though I am still adding a few things here and there.

Saturday, August 21, 2004

*  Recent Topics

*  Fog Creek Home