Skip to content

Class ExcelTime

Namespace: OfficeOpenXml.DataValidation
Assembly: EPPlus.dll

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

public class ExcelTime

Inheritance

object ← ExcelTime

Inherited Members

object.Equals(object?, object?)
object.Equals(object?)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
object.ReferenceEquals(object?, object?)
object.ToString()

Constructors

ExcelTime()

Default constructor

public ExcelTime()

ExcelTime(double)

Constructor

public ExcelTime(double value)

Parameters

value double

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 double ToExcelTime()

Returns

double

ToString()

Converts the object to a string

public override string ToString()

Returns

string

The string