SystemDiagnosticsTraceWriter.FormatDateTime Method
Formats a DateTime for the trace.
Namespace: System.Web.Http.Tracing
Assembly: System.Web.Http.Tracing (in System.Web.Http.Tracing.dll)
Syntax
'Declaration
Public Overridable Function FormatDateTime ( _
dateTime As DateTime _
) As String
'Usage
Dim instance As SystemDiagnosticsTraceWriter
Dim dateTime As DateTime
Dim returnValue As String
returnValue = instance.FormatDateTime(dateTime)
public virtual string FormatDateTime(
DateTime dateTime
)
public:
virtual String^ FormatDateTime(
DateTime dateTime
)
abstract FormatDateTime :
dateTime:DateTime -> string
override FormatDateTime :
dateTime:DateTime -> string
public function FormatDateTime(
dateTime : DateTime
) : String
Parameters
- dateTime
Type: System.DateTime
The DateTime
Return Value
Type: System.String
The DateTime formatted as a string
Remarks
The default implementation uses the ISO 8601 convention for dates that can be round-tripped and parsed.