convert datetime to string
-
i want to convert date time to a string representation e.g. 30/12/2009 -- 30 day of December two thousand nine
Ferron
-
i want to convert date time to a string representation e.g. 30/12/2009 -- 30 day of December two thousand nine
Ferron
Its very simple... stringVariable = Convert.ToString(MyDate);
Software Development & Web Development is my addiction. I am a Visual C# 2.0 and ASP.NET 2.0 Developer and working in Visual Studio 2005 using Dot Net Framework 2.0. Email: bottomless.wisdom@hotmail.com Web: http://bottomless-wisdom.spaces.live.com
-
i want to convert date time to a string representation e.g. 30/12/2009 -- 30 day of December two thousand nine
Ferron
google convert datetime to [^]
:) I Love KongFu~
-
i want to convert date time to a string representation e.g. 30/12/2009 -- 30 day of December two thousand nine
Ferron
You can either use the Convert object
string myDateString = Convert.ToString(myDateTimeObject);
or you can use
string myDateStr = myDateTimeObject.ToString("yyyyMMdd");
or you can use
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001 -
You can either use the Convert object
string myDateString = Convert.ToString(myDateTimeObject);
or you can use
string myDateStr = myDateTimeObject.ToString("yyyyMMdd");
or you can use
"Why don't you tie a kerosene-soaked rag around your ankles so the ants won't climb up and eat your candy ass..." - Dale Earnhardt, 1997
-----
"...the staggering layers of obscenity in your statement make it a work of art on so many levels." - Jason Jystad, 10/26/2001i tried what you guys suggested and it doesn't seem to be working. What i really want something to convert from the datetime e.g. 12/3/2007 to 12 of December two thousand seven here is my code
//Convert the value to a string representation
String mydateString = System.DateTime.Now.ToString("ddMMyyyy");
lblDATE0.Text = Convert.ToString(mydateString);Ferron