Class ExcelTime
Represents a time between 00:00:00 and 23:59:59
Inherited Members
Namespace: OfficeOpenXml.DataValidation
Assembly: EPPlus.dll
Syntax
public class ExcelTime
Constructors
ExcelTime()
Default constructor
Declaration
public ExcelTime()
ExcelTime(double)
Constructor
Declaration
public ExcelTime(double value)
Parameters
| Type | Name | Description |
|---|---|---|
| double | value | An existing time for initialization |
Fields
NumberOfDecimals
Max number of decimals when rounding.
Declaration
public const int NumberOfDecimals = 15
Field Value
| Type | Description |
|---|---|
| int |
Properties
Hour
Hour between 0 and 23
Declaration
public int Hour { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Minute
Minute between 0 and 59
Declaration
public int Minute { get; set; }
Property Value
| Type | Description |
|---|---|
| int |
Second
Second between 0 and 59
Declaration
public int? Second { get; set; }
Property Value
| Type | Description |
|---|---|
| int? |
Methods
ToExcelString()
Returns the excel decimal representation of a time as a string.
Declaration
public string ToExcelString()
Returns
| Type | Description |
|---|---|
| string |
ToExcelTime()
Returns the excel decimal representation of a time.
Declaration
public double ToExcelTime()
Returns
| Type | Description |
|---|---|
| double |
ToString()
Converts the object to a string
Declaration
public override string ToString()
Returns
| Type | Description |
|---|---|
| string | The string |