Specifies the formatting for date and time.
Syntax
Visual Basic (Declaration) | |
---|
Public Enum DateTimeFormat
Inherits System.Enum |
Members
Example
This examples specifies that the format for a date-time cell should be an abbreviated date with the time included.
C# | Copy Code |
---|
FarPoint.Win.Spread.CellType.DateTimeCellType dattimct = new FarPoint.Win.Spread.CellType.DateTimeCellType();
System.DateTime spectime = new System.DateTime(2003, 1, 7, 10, 10, 5);
dattimct.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.ShortDateWithTime;
fpSpread1.ActiveSheet.Cells[0, 0].CellType = dattimct;
fpSpread1.ActiveSheet.Cells[0, 0].Value = spectime;
fpSpread1.ActiveSheet.Columns[0].Width = 200; |
Visual Basic | Copy Code |
---|
Dim dattimct As New FarPoint.Win.Spread.CellType.DateTimeCellType()
Dim spectime As New System.DateTime(2003, 1, 7, 10, 10, 5)
dattimct.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.ShortDateWithTime
FpSpread1.ActiveSheet.Cells(0, 0).CellType = dattimct
FpSpread1.ActiveSheet.Cells(0, 0).Value = spectime
FpSpread1.ActiveSheet.Columns(0).Width = 200 |
Inheritance Hierarchy
Requirements
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2
See Also