DateFmtType Property
The DateFmtType property returns or sets the date formatting in the worksheet.
Syntax
object.DateTimeFmtType
object.DateTimeFmtType = DateType
Parameter | Type | Description |
DateType | wksDateFmtType | required; date format |
Example
This example shows how to set the date format for a cell.
'Sets the date format to m/d/yy such as: 9/7/98
WksCellFormat.DateFmtType = wksDateFmt_M_D_YY
Example 2
This example shows how to return the date format for a cell to the Immediate Pane.
'Return the numeric date format to the Immediate Pane
Debug.Print WksCellFormat.DateFmtType
Used by: WksCellFormat object