• DR-IT Software
  • Products
  • Documentation
  • Product page
  • Examples
  • API reference
  • Support
Show / Hide Table of Contents

Class DateTimeFormat

Represents a date/time format for cell values.

Inheritance
object
Format
DateTimeFormat
Inherited Members
Format._code
Format.Parse(string)
Format.GetHashCode()
Format.Equals(object)
Format.GetColor(object)
Format.Code
Format.FormatCode
object.ToString()
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetType()
object.MemberwiseClone()
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
Format.Category

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
Format.CanFormat(object)

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.

Back to top

DR-IT Software documentation

DR-IT Software · Products · Documentation index · Product page · Downloads · Support · Licensing

Generated by DocFX