SetCentury Function (Logic) | |
Return and optionally change the setting that determines whether to include or omit century digits in the date format.
Namespace:
XSharp.Core
Assembly:
XSharp.Core (in XSharp.Core.dll) Version: 2.19
Syntax FUNCTION SetCentury(
lNewSetting AS LOGIC
) AS LOGIC
public static bool SetCentury(
bool lNewSetting
)
Request Example
View SourceParameters
- lNewSetting
- Type: Logic
TRUE includes century digits, meaning the date format contains four digits for the year and can include a century other than 19xx. FALSE omits century digits, meaning the date format contains only two digits for the year.
This means that century digits of dates are not displayed and cannot be input.
The initial default is TRUE.
Return Value
Type:
Logic
If
lNewSetting is not specified, SetCentury() returns the current setting.
If
lNewSetting is specified, the previous setting is returned.
Remarks
SetCentury() modifies the current date format as set by SetDateFormat(). Note that only the display and input format of dates is affected; date calculations maintain the century information regardless of the date format.
Examples
This example shows the results of a simple SetCentury function:
1SetCentury(FALSE)
2? TODAY()
3SetCentury(TRUE)
4? TODAY()
See Also