Json.NET - Quick Starts & API Documentation
ToString Method (value, format)
Namespaces ► Newtonsoft.Json ► JsonConvert ► ToString(DateTimeOffset, DateFormatHandling)
Converts the DateTimeOffset to its JSON string representation using the DateFormatHandling specified.
Declaration Syntax
C# | Visual Basic | Visual C++ |
public static string ToString( DateTimeOffset value, DateFormatHandling format )
Public Shared Function ToString ( _ value As DateTimeOffset, _ format As DateFormatHandling _ ) As String
public: static String^ ToString( DateTimeOffset value, DateFormatHandling format )
Parameters
- value (DateTimeOffset)
- The value to convert.
- format (DateFormatHandling)
- The format the date will be converted to.
Return Value
A JSON string representation of the DateTimeOffset.