i am converting my date to Universal Time using mydate.ToUniversalTime() in vb.net its giving me right time but its giving me time in "5/4/2010 4:30:00 AM" format (in vb.net) but i want it in "Wed, 05 May 2010 05:50:00 GMT" format.. please help me to make it in "Wed, 05 May 2010 05:50:00 GMT" format. value of both date are different so please check only their format.
views:
18answers:
1
+1
A:
When converting the date to a string, provide a format string.
Dim myDateTime As DateTime = DateTime.Now
Dim myDateTimeString As String = myDateTime.ToString( "ddd, dd MMM yyyy hh:mm:ss ""GMT""" )
Phil Young
2010-05-03 10:47:24
thanks for reply. i am checking..
Rajesh Rolen- DotNet Developer
2010-05-03 10:52:51
Thanks a lot dear..
Rajesh Rolen- DotNet Developer
2010-05-03 10:59:04