Spread Windows Forms 12.0 Product Documentation
DateTimeCellType Constructor()
Example 


FarPoint.Win.Spread Assembly > FarPoint.Win.Spread.CellType Namespace > DateTimeCellType Class > DateTimeCellType Constructor : DateTimeCellType Constructor()
Creates a new date-time cell with default settings.
Syntax
'Declaration
 
Public Function New()
'Usage
 
Dim instance As New DateTimeCellType()
public DateTimeCellType()
Example
This example creates a cell of this type, sets properties of this cell type, and assigns this cell type to a cell.
FarPoint.Win.Spread.CellType.DateTimeCellType datecell = new FarPoint.Win.Spread.CellType.DateTimeCellType();
datecell.AMString = "a.m. (morning)";
datecell.PMString = "p.m. (evening)";
datecell.DateSeparator = " | ";
datecell.TimeSeparator = ":";
datecell.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.ShortDateWithTime;
datecell.MaximumDate = new System.DateTime(2010, 1, 1);
datecell.MinimumDate = new System.DateTime(1990, 12, 31);
datecell.MaximumTime = new System.TimeSpan(15, 59, 59);
datecell.MinimumTime = new System.TimeSpan(11, 0, 0);
datecell.SpinButton = true;
fpSpread1.Sheets[0].Cells[7,2].CellType = datecell;
fpSpread1.Sheets[0].Cells[7,2].Value = System.DateTime.Now;
Dim datecell As New FarPoint.Win.Spread.CellType.DateTimeCellType()
datecell.AMString = "a.m. (morning)"
datecell.PMString = "p.m. (evening)"
datecell.DateSeparator = " | "
datecell.TimeSeparator = ":"
datecell.DateTimeFormat = FarPoint.Win.Spread.CellType.DateTimeFormat.ShortDateWithTime
datecell.MaximumDate = new System.DateTime(2010, 1, 1)
datecell.MinimumDate = new System.DateTime(1990, 12, 31)
datecell.MaximumTime = new System.TimeSpan(15, 59, 59)
datecell.MinimumTime = new System.TimeSpan(11, 0, 0)
datecell.SpinButton = True
fpSpread1.Sheets(0).Cells(7,2).CellType = datecell
fpSpread1.Sheets(0).Cells(7,2).Value = System.DateTime.Now
See Also

Reference

DateTimeCellType Class
DateTimeCellType Members
Overload List