Method Date
Date(DateTime)
Creates a date value, stored as the serial number Excel dates use.
public static XlsxCellValue Date(DateTime value)
Parameters
valueDateTimeThe date and time.
Returns
- XlsxCellValue
The value.
Remarks
The cell is only shown as a date when its style carries a date number format; a serial number with a general format displays as the number it is, which is Excel's own behaviour rather than a defect here.