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");
Was this article helpful?
0 out Of 5 Stars
5 Stars 0%
4 Stars 0%
3 Stars 0%
2 Stars 0%
1 Stars 0%
How can we improve this article?
Please submit the reason for your vote so that we can improve the article.