Table of Contents

Method Date

Namespace
DocWright.Formats.Xlsx
Assembly
DocWright.Formats.Xlsx.dll

Date(DateTime)

Creates a date value, stored as the serial number Excel dates use.

public static XlsxCellValue Date(DateTime value)

Parameters

value DateTime

The 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.