.net - C# Datetime formatting -


I want to know that there is already a build-in C # method which I would quickly get to the date of an American culture ( 07 / 22/200 9) to '200 9 722' string

I am using .NET Framework 2.0;

Thank you!

Assume that you already have a datetime:

  DateTime dt = DateTime.Today; Dt.ToString ("YYYYMMDD");  

If you have an N-US datetime string, you can parse it like this:

  datetime DT = date time. Paraaxect ("07/22/2009", "MM / DD / YYY", Culture Info. GETCalcherINFO ("N-US")); See section on MSDN and  dateTime  format strings.  


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -