DriveWorks Solo 15: TableFormat [send feedback...]

TableFormat

Applies a format to all values in a specified column of a table.

Syntax

TableFormat(Table or Table Name As Table, Column Index As Double, Format As String)

Where:

Table or Table Name is the Table to format.

Column Index is the number of the column in which the formatting will be applied.

Format is the formatting string to use. Where:

  • "0000.00" - Formats a number with up to four leading zeroes, and two decimal places.
  • "#.00" - Formats a number to two decimal places.
  • "DDDDMMYY-HHMMSS" - Formats a date

Examples

RuleMeaning
TableFormat(DWLookupCurrency,4,"MMM-YY")Will return an array from the table Data, with the values in column 4 formatted as a date.

Example Data

Currency Table

CountryCurrencyRateDate
FranceEuro1.329/03/15
United StatesDollar1.418/02/15
GermanyEuro1.322/01/15
United KingdomPound115/07/14

Example Outcome

Currency Table

CountryCurrencyRateDate
FranceEuro1.3Mar-15
United StatesDollar1.4Feb-15
GermanyEuro1.3Jan-15
United KingdomPound1Jul-14

DriveWorks will return the table above as an array, which will look like:

Table returned as an Array
{"Country","Currency","Rate","Date";"France","Euro","1.3","Mar-15";"United States","Dollar","1.4","Feb-15";"Germany","Euro","1.3","Jan-15";"United Kingdom","Pound","1","Jul-14"}


Table of Contents