Spread Windows Forms 11.0 Product Documentation
DateTimeFormat Enumeration
Example Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace : DateTimeFormat Enumeration
Specifies the formatting for date and time.
Syntax
'Declaration
 
Public Enum DateTimeFormat 
   Inherits System.Enum
'Usage
 
Dim instance As DateTimeFormat
public enum DateTimeFormat : System.Enum 
Members
MemberDescription
LongDateUses the long form for the date
LongDateWithTimeUses the long form for the date and time
ShortDateUses the abbreviated form for the date
ShortDateWithTimeUses the abbreviated form for the date and time
TimeOnlyUses the time only (no date)
UserDefinedUses the user-defined date and time format
Example
This examples specifies that the format for a date-time cell should be an abbreviated date with the time included.
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;
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

System.Object
   System.ValueType
      System.Enum
         FarPoint.Win.Spread.CellType.DateTimeFormat

See Also

Reference

FarPoint.Win.Spread.CellType Namespace
DateTimeFormat Property (DateTimeCellType Class)
DateTimeFormat Property (GeneralCellType Class)

User-Task Documentation

Setting a Date-Time Cell
Setting a General Cell