Class DateTimeFormat
Represents a date/time format for cell values.
Inherited Members
Namespace: DRIT.Spreadsheet
Assembly: DRIT.Spreadsheet.dll
Syntax
public class DateTimeFormat : Format
Constructors
DateTimeFormat(string)
Initializes a new instance of the DateTimeFormat class.
Declaration
public DateTimeFormat(string code)
Parameters
| Type | Name | Description |
|---|---|---|
| string | code | The format code string. |
Properties
Category
Exposes the category associated with DateTimeFormat.
Declaration
public override FormatCategory Category { get; }
Property Value
| Type | Description |
|---|---|
| FormatCategory | The category returned by the operation. |
Overrides
Methods
CanFormat(object)
Determines whether this format can format the specified object.
Declaration
public override bool CanFormat(object o)
Parameters
| Type | Name | Description |
|---|---|---|
| object | o | The object to check. |
Returns
| Type | Description |
|---|---|
| bool | True if the object can be formatted, false otherwise. |
Overrides
GetFormattedValue(DateTime)
Gets the formatted value for a DateTime value.
Declaration
public object GetFormattedValue(DateTime dt)
Parameters
| Type | Name | Description |
|---|---|---|
| DateTime | dt | The DateTime value to format. |
Returns
| Type | Description |
|---|---|
| object | The formatted string value. |