ExtendedDataGridView DateCellStyleFormat Property CleanCode C# Libraries v1.2.03 API
Gets or sets the date cell style format.

Namespace: CleanCode.DataGridViewControls
Assembly: CleanCode.DataGridViewControls (in CleanCode.DataGridViewControls.dll) Version: 1.2.3.0 (1.2.03)
Syntax

public string DateCellStyleFormat { get; set; }

Field Value

The date cell style format. Default is an empty string.
Remarks

Default is an empty string, which normally renders the same as the format string "g" as "MM/dd/yyyy HH:mm". To add seconds to this, change to "G". See OnlineStandard Date and Time Format Strings for other possible selections.

Note that the empty string is not the same as an explicit setting of "g", though. Here is one example where they differ. Say you are connecting to Oracle and your query includes selecting TRUNC(BillingDate). Further assume that one such value in that field is "1/2/2009 5:03:28 PM". If DateCellStyleFormat is set to the empty string, then TRUNC(BillingDate) renders as "1/2/2009". If, however, DateCellStyleFormat is set to "g", then TRUNC(BillingDate) renders as "1/2/2009 12:00 AM".

See Also