SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftMask/OCX 7.0 - Masked Edit Control
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftPrintPreview/DLL 2.0 - Print Preview Control (discontinued)
SftTree/DLL 7.5 - Tree Control
SftBox/OCX 5.0 - Combo Box Control
SftButton/OCX 3.0 - Button Control
SftDirectory 3.5 - File/Folder Control (discontinued)
SftMask/OCX 7.0 - Masked Edit Control
SftOptions 1.0 - Registry/INI Control (discontinued)
SftPrintPreview/OCX 1.0 - Print Preview Control (discontinued)
SftTabs/OCX 6.5 - Tab Control (VB6 only)
SftTree/OCX 7.5 - Tree Control
SftTabs/NET 6.0 - Tab Control (discontinued)
SftTree/NET 2.0 - Tree Control
Converts a date into a displayable string.
VB.NET | object.FormatDateV(ByVal Dt As Date, ByRef Text As Object) |
VB | object.FormatDateV(ByVal Dt As Date, Text As Variant) |
C#.NET | void object.FormatDateV(System.DateTime Dt, ref object Text); |
VC++ | HRESULT object->FormatDateV(DATE Dt, const _variant_t&* Text); |
C | HRESULT object->raw_FormatDateV(DATE Dt, VARIANT* Text); |
object
Dt
The date to be converted to a formatted string.
Text
The caller provides a formatting string or a predefined formatting string, based on which the Date Dt is formatted. If an empty string is used, the short date format is used. The formatted string is returned in Text.
Text | Description |
---|---|
"short" | The short date format is used (as defined by the user locale). |
"long" | The long date format is used (as defined by the user locale). |
formatting string | The formatting string (as supported by GetDateFormat) is used to format the specified date. See below for valid formatting strings. |
The FormatDateV method converts a date into a displayable string.
The FormatDateV method uses the Windows GetDateFormat API to format the specified date Dt.
Text can be defined as "short", "long" or as a formatting string as supported by the Windows GetDateFormat API. A formatting string can consist of one or more of the following items:
Text | Description |
---|---|
d | Day of month (without leading zero for single-digit days) |
dd | Day of month (with leading zero for single-digit days) |
ddd | Day of week as a three-letter abbreviation (using GetLocaleInfo, LOCALE_SABBREVDAYNAME) |
dddd | Day of week as its full name (using GetLocaleInfo, LOCALE_SDAYNAME) |
M | Month (digits without leading zero for single-digit months) |
MM | Month (digits with leading zero for single-digit months) |
MMM | Month as a three-letter abbreviation (using GetLocaleInfo, LOCALE_SABBREVMONTHNAME) |
MMMM | Month as its full name (using GetLocaleInfo, LOCALE_SMONTHNAME) |
y | Year as last two digits (without leading) |
yy | Year as last two digits (with leading zero) |
yyyy | Year represented by full four digits. |
gg | Period/era string (using GetLocaleInfo, CAL_SERASTRING). This is ignored if the date to be formatted does not have an associated era or period string. |
Literal characters must be enclosed by single quotes:
Text = "dddd, MMMM d 'in the year' yyyy"
To specify a literal single quote, use two quotes:
Text = "dddd, MMMM d 'in '''yy"
FormatDateV is used for languages such as VBScript, which are limited by requiring Variant arguments and do not support strongly typed arguments for return values. For more information please see Using SftMask/OCX with Internet Explorer.
See Also SftMaskCalendar Object | Object Hierarchy