C# Help Please - Date Formats

  • Thread starter Thread starter Yoshi
  • Start date Start date
Y

Yoshi

Is there a way to programatilly obtain a list of all the data formats using
C# code?

Thanks,

Dave
 
Yoshi said:
Is there a way to programatilly obtain a list of all the data formats using
C# code?

What do you mean by "all the data formats" exactly?
 
What I mean is... I want to obtain a list of all the available Date and Time
patterns (formats). After doing some more research, I have figured out how
to do it.

Here is the code I wrote:

DateTimeFormatInfo d = new DateTimeFormatInfo();


string[] patterns = d.GetAllDateTimePatterns();


foreach (string s in patterns)

MessageBox.Show(s.ToString());


Thanks for responding though. I appreciate the fast response.

David
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top