SET DATESTRINGS
Change SQL Month and Day Names
This directive is used to change the string of the DATESTRINGS system variable.
Syntax
Section titled “Syntax”SET DATESTRINGS string-value [,ERR=line-ref|ERC=error-code]string-value- is a string of names of the 12 months and 7 days of the week, separated by single commas, without spaces. The names may be in any language. The string must contain 19 names and 18 commas.
line-ref- is the program line number or label to branch to if this directive produces an error.
error-code- is a programmer-defined error code. Valid values are positive or negative whole numbers.
Remarks
Section titled “Remarks”This directive is generally available starting with release level 8.1.
The string value is a string with the names of the 12 months and 7 days, all separated by 18 commas.
The default string value for this system variable is the full names of the months and days in English.
This directive is used to change the month and day names used by the SQL date functions.
This directive returns an ERR=17 if the commas in the string are not equal to 18. Thus, to be a valid parameter, there should be 18 commas (,) in the string.
This directive returns an ERR=17 if one of the months or days has a character length less than three. (There must be at least three characters between, before, and after each comma.)
This directive returns an ERR=33 if either the months or days have an average character length of more than nine. (If there are more than nine characters in any month name, then at least one other name must have fewer than nine. The same is true of day names).
Thoroughbred Basic handles the list of months separate from the list of days. The minimum allowable length of the month string, including commas, is 47; the maximum is 119. The minimum length of the day string is 27; the maximum is 69. Because the names of the months are stored separately from the names of the days, adjusting the size of one string may not correct an ERR=17 or ERR=33 if the other string is too long or too short; check the length of both strings.
Examples
Section titled “Examples”sets the DATESTRINGS system variable to the German names of the months and days of the week.
SET DATESTRINGS A$If A$ is the default for the names in English, this statement sets DATESTRINGS to the full English names of the 12 months and 7 days.
See also
Section titled “See also”DATESTRINGS system variable
DTN and NTD functions
From the Thoroughbred Basic Language Reference, Volume III: R–Z, version 8.9.1. Open this page in the PDF