Spread Windows Forms 9.0 Product Documentation
DateTimeFormat Property (GeneralCellType)
Example 


Gets or sets a DateTimeFormatInfo object that defines the format for displaying dates and times.
Syntax
'Declaration
 
Public Overridable Property DateTimeFormat As DateTimeFormatInfo
'Usage
 
Dim instance As GeneralCellType
Dim value As DateTimeFormatInfo
 
instance.DateTimeFormat = value
 
value = instance.DateTimeFormat
public virtual DateTimeFormatInfo DateTimeFormat {get; set;}

Property Value

DateTimeFormatInfo object containing the format for date and time values
Example
This example specifies the format string used to format the date value.
FarPoint.Win.Spread.CellType.GeneralCellType genlcell = new FarPoint.Win.Spread.CellType.GeneralCellType();
System.Globalization.DateTimeFormatInfo dtinfo; 
dtinfo = System.Globalization.DateTimeFormatInfo.CurrentInfo;
genlcell.DateTimeFormat = dtinfo;
fpSpread1.ActiveSheet.Cells[0, 0].CellType = genlcell;
fpSpread1.ActiveSheet.Cells[0, 0].Value = DateTime.Now;
Dim genlcell As New FarPoint.Win.Spread.CellType.GeneralCellType()
Dim dtinfo As New System.Globalization.DateTimeFormatInfo()
genlcell.DateTimeFormat = dtinfo.CurrentInfo
FpSpread1.ActiveSheet.Cells(0, 0).CellType = genlcell
FpSpread1.ActiveSheet.Cells(0, 0).Value = DateTime.Now
Requirements

Target Platforms: Windows 2000 Professional (SP4), Windows 2000 Server, Windows 2003 Server (SP1), Windows Server 2012 R2, Windows 2008, Windows XP (SP2), Windows Vista, Windows 7, Windows 8, Windows 8.1, Windows 10

See Also

Reference

GeneralCellType Class
GeneralCellType Members

 

 


Copyright © GrapeCity, inc. All rights reserved.