Skip to main content

Search OfficeIMO

Enter a topic, API type, or PowerShell command.

Documentation Search all OfficeIMO/

API Reference

Class

ExcelDateSystemConverter

Namespace OfficeIMO.Excel
Assembly OfficeIMO.Excel
Source revision 3eb21ed25cb9 with working tree changes
Modifiers static

Converts dates to and from Excel serial values using the workbook's configured date system.

Inheritance

  • Object
  • ExcelDateSystemConverter

Methods

public static DateTime FromSerial(Double serial, ExcelDateSystem dateSystem) #
Returns: DateTime

Converts an Excel serial value from the selected date system to a date. In the 1900 system, serial 60 denotes Excel's fictitious February 29 and maps to February 28 because DateTime cannot represent it. Negative 1900-system serials extend the December 31, 1899 epoch backwards, with fractional values representing elapsed portions of a day.

Parameters

serial System.Double requiredposition: 0
dateSystem OfficeIMO.Excel.ExcelDateSystem requiredposition: 1
public static Double ToSerial(DateTime value, ExcelDateSystem dateSystem) #
Returns: Double

Converts a date to the serial value used by the selected Excel date system.

Parameters

value System.DateTime requiredposition: 0
dateSystem OfficeIMO.Excel.ExcelDateSystem requiredposition: 1

Fields

public const Double Date1904OffsetDays #

Number of days between the Excel 1900 and 1904 date-system epochs.

Value: 1462