Yannis Yannis - 3 months ago 16
Vb.net Question

DateTime 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