format

Overview

Returns the formatted value of a given value.

string format (val, [format])

Arguments

any value

Value to be formatted.


string format

Format to be used. Optional.

Return Value

Formatted value

Remarks


Examples

<Customer><Name>hello</Name><Age>123456.789</Age><DT>2014-01-31T09:00:00+02:00</DT><Money>123456789</Money></Customer>

format(Customer/Name) -> 'hello'
format(number(Customer/Age)) -> '123,456.79'
format(Customer/DT,'dd/MM/yyyy') -> '31/01/2014'
format(number(Customer/Money),'c') -> 123.456.789,00


See Also


Copyright © 2010 - 2023 Emakin. All rights reserved.