Java.Text.DateFormat.Format Method
Formats the specified object as a string using the pattern of this date format and appends the string to the specified string buffer.

Syntax

[Android.Runtime.Register("format", "(Ljava/lang/Object;Ljava/lang/StringBuffer;Ljava/text/FieldPosition;)Ljava/lang/StringBuffer;", "")]
public override sealed Java.Lang.StringBuffer Format (Java.Lang.Object object, Java.Lang.StringBuffer buffer, FieldPosition field)

Parameters

object
the source object to format, must be a Date or a Number. If object is a number then a date is constructed using the longValue() of the number.
buffer
the target string buffer to append the formatted date/time to.
field
on input: an optional alignment field; on output: the offsets of the alignment field in the formatted text.

Returns

Documentation for this section has not yet been entered.

Exceptions

TypeReason
Java.Lang.IllegalArgumentExceptionif object is neither a Date nor a Number instance.

Remarks

Formats the specified object as a string using the pattern of this date format and appends the string to the specified string buffer.

If the field member of field contains a value specifying a format field, then its beginIndex and endIndex members will be updated with the position of the first occurrence of this field in the formatted text.

[Android Documentation]

Requirements

Namespace: Java.Text
Assembly: Mono.Android (in Mono.Android.dll)
Assembly Versions: 0.0.0.0
Since: Added in API level 1