SimpleDateFormatter FormatDate Method | Apache log4net™ SDK Documentation

Formats the date using [M:DateTime.ToString(string, IFormatProvider)].

Namespace: log4net.DateFormatter
Assembly: log4net (in log4net.dll) Version: 2.0.8.0-.NET 4.0
Syntax

C#
VB
C++
F#
Copy

    public virtual void FormatDate(
    	DateTime dateToFormat,
    	TextWriter writer
    )

    Public Overridable Sub FormatDate (
    	dateToFormat As DateTime,
    	writer As TextWriter
    )

    public:
    virtual void FormatDate(
    	DateTime dateToFormat,
    	TextWriter^ writer
    )

    abstract FormatDate :
            dateToFormat : DateTime *
            writer : TextWriter -> unit
    override FormatDate :
            dateToFormat : DateTime *
            writer : TextWriter -> unit

#### Parameters

dateToFormat
  Type: System
  DateTime
  The date to convert to a string.
writer
  Type: System.IO
  TextWriter
  The writer to write to.

#### Implements

IDateFormatter
FormatDate(DateTime, TextWriter)
Remarks

Uses the date format string supplied to the constructor to call the [M:DateTime.ToString(string, IFormatProvider)] method to format the date.

See Also

#### Reference

SimpleDateFormatter Class
log4net.DateFormatter Namespace