Util.SetSystemText

Top  Previous  Next

 

Syntax

function Util.SetSystemText(SysTextType: integer; Value1: string; [Value2, Value_n: string]): boolean

 

Description

Sets a global system text to the value or values specified.

 

Returns TRUE if the text has been modified, FALSE otherwise.

 

SysTextType can be one of the following constants:

__sysDateSeparator

Sets the data separator, the character between year, month and day.

__sysTimeSeparator

Sets the time separator, the character between hours, minutes and seconds.

__sysShortDateFormat

Sets the complete short date format.

__sysLongDateFormat

Sets the complete long date format.

__sysShortTimeFormat

Sets the complete short time format.

__sysLongTimeFormat

Sets the complete long time format.

__sysTimeAMString

Sets the time AM-indicator when using 12 hour formatting.

__sysTimePMString

Sets the time PM-indicator when using 12 hour formatting.

__sysShortMonthNames

Sets the short month names, this requires 12 values.

__sysLongMonthNames

Sets the long month names, this requires 12 values.

__sysShortDayNames

Sets the short day names, this requires 7 values.

__sysLongDayNames

Sets the long day names, this requires 7 values.

__sysThousandSeparator

Sets the digit thousand separator.

__sysDecimalSeparator

Sets the digit decimal separator.

 

See Also

Util.FormatDateTime
Util.FormatFloat

 

Example

execute UDSBlock

as

declare dtvalue timestamp;

begin

  dtvalue = Util.Now();

  

  /* format date as yyyy-mm-dd and time as hh:nn:ss */

  Util.SetSystemText(__sysDateSeperator, '-');

  datestr = Util.FormatDateTime('yyyy/mm/dd', dtvalue);

  timestr = Util.FormatDateTime('hh":"nn":"ss', dtvalue);

  GUI.ShowMessage('The date: ' || datestr || ', the time: ' || timestr);

  

  /* format combined, 12 hour click with am/pm indicator */

  datetimestr = Util.FormatDateTime('dd"/"mm"/"yyyy hh":"nn":"ss am/pm', dtvalue);

  GUI.ShowMessage('Date and time: ' || datetimestr);

  

  Util.SetSystemText(__sysLongDayNames, 'Zondag', 'Maandag', 'Dinsdag', 'Woensdag', 'Donderdag', 'Vrijdag', 'Zaterdag');

  /* format with textual representation of day and month with actual text in the formatting string */

  datetimestr = Util.FormatDateTime('"Today it''s "dddd", the "d"th of "mmmm" in "yyyy"."', dtvalue);

  GUI.ShowMessage(datetimestr);

end