Version

DateTimeToExcelDate(Workbook,DateTime,Boolean) Method

Converts a DateTime to Excel's numerical representation of a date.
Syntax
public static Nullable<double> DateTimeToExcelDate( 
   Workbook workbook,
   DateTime dateValue,
   bool shouldCorrect1900Dates
)

Parameters

workbook
dateValue
The DateTime value to convert to the Microsoft Excel date format.
shouldCorrect1900Dates
When using the 1900 date system in Excel, dates before 3/1/1900 must be corrected, because Excel incorrectly assumes 1900 is a leap year. Pass False to disable this correction.
Requirements

Target Platforms: Android 4.4+, iOS 8+

Development Environments: Visual Studio 2015+, Visual Studio for Mac Preview, Xamarin for Visual Studio 4.2+

See Also