Table of Contents

Class ExcelTime

Namespace
OfficeOpenXml.DataValidation
Assembly
EPPlus.dll

Represents a time between 00:00:00 and 23:59:59

public class ExcelTime
Inheritance
ExcelTime
Inherited Members

Constructors

ExcelTime()

Default constructor

public ExcelTime()

ExcelTime(decimal)

Constructor

public ExcelTime(decimal value)

Parameters

value decimal

An existing time for initialization

Fields

NumberOfDecimals

Max number of decimals when rounding.

public const int NumberOfDecimals = 15

Field Value

int

Properties

Hour

Hour between 0 and 23

public int Hour { get; set; }

Property Value

int

Minute

Minute between 0 and 59

public int Minute { get; set; }

Property Value

int

Second

Second between 0 and 59

public int? Second { get; set; }

Property Value

int?

Methods

ToExcelString()

Returns the excel decimal representation of a time as a string.

public string ToExcelString()

Returns

string

ToExcelTime()

Returns the excel decimal representation of a time.

public decimal ToExcelTime()

Returns

decimal

ToString()

Converts the object to a string

public override string ToString()

Returns

string

The string