Help wanted for datetime.

Post your questions regarding programming in C# in here.
2 posts Page 1 of 1
Contributors
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Help wanted for datetime.
Dummy1912
Hello,

yes we are in the correct section :)
who can help me to make this work for the current date format
it seems this won't work it said String was not recognized as a valid DateTime.

'my current code
Code: Select all
string s3 = DateTime.Parse(dt.Rows[i][5].ToString().Trim()).ToShortDateString() + " - " + DateTime.Parse(dt.Rows[i][5].ToString().Trim()).ToShortTimeString();
                string s4 = DateTime.Parse(dt.Rows[i][5].ToString().Trim()).ToLongDateString();

i need this:
Tue, 21 Aug 2012 13:15:03 +0200 for example
how can i get this to datetime string :)

thank you.
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
User avatar
Dummy1912
VIP - Donator
VIP - Donator
Posts: 1969
Joined: Sat Aug 21, 2010 2:17 pm

Re: Help wanted for datetime.
Dummy1912
thanks #XTechVB
its been solved ;)
visit us on:


http://www.softpedia.com/get/System/Lau ... -Run.shtml
Check it out ! http://www.softpedia.com/publisher/I-A- ... 90017.html
Check it out ! http://www.softpedia.com/get/Desktop-En ... lock.shtml
2 posts Page 1 of 1
Return to “General coding help”