Yannis Yannis - 3 months ago 18
Vb.net Question

vb.net date format as "Fri, 14 Oct 2011 23:10:10 -0000"

i try to use vb.net to get this format for now().
can you please help me how to do this .
it is not a supported format here
Microsoft MSDN

Answer

Try this:

Public Sub Main()
    Dim date1 As Date = #10/14/2011 11:10:10PM#
    Console.WriteLine(date1.ToString("ddd, d MMM yyyy H:mm:ss -0000", _
              CultureInfo.CreateSpecificCulture("en-US")))
End Sub

Output:

Fri, 14 Oct 2011 23:10:10 -0000

See the Working Fiddle