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