FormatValue
This function will format specified value, which must be of DateTime or Decimal type, according to specified format.
Syntax
FormatValue("value","formatString");
Function arguments
- value – (UNKNOWN) The value to be formatted. It’s type should be DateTime or Decimal.
- formatString – (String) The format string according to which specified value is to be formatted
Return value
This function returns String.
This will return formatted value, decimal or DateTime, or unchanged input value if it was of not supported type.
Examples
Example 1:
This will return '2015 Feb 13′
FormatValue("2015-02-13","yyyy MMM dd");
Example 2:
This will return '16,325.620′
FormatValue("16325.62","0,0.000");
Example 3:
This will return 'some string value’ since string formatting is not supported
FormatValue("some string value", "some format string");