Brilliant Database Software - Home
Database software - Online Help System

Online Help System

Back to Brilliant Database Web-Site | Write to Support | Help Index



Using Formatting

table border="0" width="100%" cellspacing="0" cellpadding="4" bgcolor="#00000077">
Using Formatting

Basic Information

Formatting determines in what way available data will be presented. For example, the number 1499.95 may be presented as $1'499.95 or as ~1500. Or, the name of a person may be displayed as Gomer J. Simpson or G. Simpson. Formatting is responsible for that.

Formatting can be used in the following cases:

  • For records fields of the type date, time, numerical, mathematical.
  • At printing fields values, exporting them to the text, html and so on.
  • In scripts and text formulas, for displaying/transforming the values of variables and fields.

Formatting is described with the help of the formatting string. The first four letters of the formatting string describe the type of formatting that we use (text/math/date/time/rset/bool); the rest of the string is formatting itself, for example:

  • Formatting string "date dd mmmm yy" will return a date in the form : "16 April 05".
  • Formatting string "text LEFT10;UCASE" will return first 10 characters of the text in the upper case.

In case we need to specify formatting for fields, it is possible to use a wizard by clicking ..., to the right of the field for entering the formatting string:

In case we need to format the value of a field or of a variable displayed in a text formula, we should separate it from the name of a field or a variable it with the "^" character. For example:

  • [$order_date^date Y-m-d]
  • [$name^text UCASE;WORD0;]
  • [total^math ###'###0.00]
  • [vip^bool yes/no]

There are on the whole 6 types of different formatting variants depending on the type of an initial value that are described in separate sections:

  • Numbers - determines how figures should be displayed (the number of characters after a comma, a group separator and so on);
  • Date - determines how dates should be displayed;
  • Time - determines how time should be displayed;
  • Boolean (bool) - allows displaying different text depending on the boolean value;
  • Text - allows performing different operations with the text (replacing a part of the text, transforming to the upper case, encrypting and so on);
  • Recordset (rset) - is used to get a value of records fields stored in a variable of the RecordSet type.



All topics in the "Formatting Data" section: