Class ExcelTime
Represents a time between 00:00:00 and 23:59:59
Inheritance
Object
ExcelTime
Inherited Members
Object.Equals(Object)
Object.Equals(Object, Object)
Object.GetHashCode()
Object.GetType()
Object.MemberwiseClone()
Object.ReferenceEquals(Object, Object)
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 |
|---|---|
| Int32 |
Properties
Hour
Hour between 0 and 23
Declaration
public int Hour { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Minute
Minute between 0 and 59
Declaration
public int Minute { get; set; }
Property Value
| Type | Description |
|---|---|
| Int32 |
Second
Second between 0 and 59
Declaration
public int? Second { get; set; }
Property Value
| Type | Description |
|---|---|
| Nullable<Int32> |
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 |
Overrides
System.Object.ToString()