views:

18

answers:

1

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.

+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
thanks for reply. i am checking..
Rajesh Rolen- DotNet Developer
Thanks a lot dear..
Rajesh Rolen- DotNet Developer