Gets or sets whether the format string being used is a date-time format string.
Syntax
Visual Basic (Declaration) | |
---|
Public Property IsDateFormat As Boolean |
Visual Basic (Usage) | Copy Code |
---|
Dim instance As GeneralCellType
Dim value As Boolean
instance.IsDateFormat = value
value = instance.IsDateFormat |
C# | |
---|
public bool IsDateFormat {get; set;} |
Property Value
True if the GeneralFormatter class's
SetFormatString method was called with the
isDateFormat parameter set to true; false otherwise
true if date-time;
false otherwise
Example
C# | Copy Code |
---|
System.Globalization.DateTimeFormatInfo dtf = new System.Globalization.DateTimeFormatInfo();
dtf.LongDatePattern = "D";
dtf.ShortDatePattern = "M/d/yyyy";
FarPoint.Web.Spread.GeneralCellType g = new FarPoint.Web.Spread.GeneralCellType();
g.DateTimeFormat = dtf;
g.FormatString = dtf.ShortDatePattern
g.IsDateFormat = true;
FpSpread1.ActiveSheetView.Cells[0, 0].CellType = g;
FpSpread1.ActiveSheetView.Cells[0, 0].Value = DateTime.Now;
|
Visual Basic | Copy Code |
---|
Dim dtf As New System.Globalization.DateTimeFormatInfo
Dim b As Boolean
dtf.LongDatePattern = "D"
dtf.ShortDatePattern = "M/d/yyyy"
Dim g As New FarPoint.Web.Spread.GeneralCellType
g.DateTimeFormat = dtf
g.FormatString = dtf.ShortDatePattern
g.IsDateFormat = True
FpSpread1.ActiveSheetView.Cells(0, 0).CellType = g
FpSpread1.ActiveSheetView.Cells(0, 0).Value = DateTime.Now |
Requirements
Target Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, Windows Vista, Windows Server 2008 family
See Also