Converts the supplied DateTimeOffset to a String in the specified format. : DateTimeOffset « Date Time « VB.Net






Converts the supplied DateTimeOffset to a String in the specified format.

  

Imports System
Imports System.Xml

Module Module1
    Sub Main()

        Dim dto As DateTimeOffset
        dto = DateTimeOffset.Now

        Dim timeAsString As [String] = XmlConvert.ToString(dto, "yyyy-MM-ddTHH:mm:sszzzzzzz")
        Console.WriteLine(timeAsString)

    End Sub
End Module

   
    
  








Related examples in the same category

1.Converts String to a DateTimeOffset equivalent with format.
2.Converts String to a DateTimeOffset, use more than one format
3.Converts the supplied DateTimeOffset to a String.