Windows apps
Collapse the table of content
Expand the table of content
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

Formatting Functions

To format a variant into a string you must first tokenize the format string and then apply the format on that string. The formatting functions can be used to apply the format in one step and to apply the same format repeatedly. For example, you can call the VarFormat function to apply the formatting at once. If you are going to apply the same format over again you can call VarTokenizeFormatString and use the tokens from VarFormatFromTokens repeatedly.

The following table describes the formatting functions.

In this section



Formats a variant into string form by parsing a format string.


Formats a variant containing currency values into a string form.


Formats a variant containing named date and time information into a string.


Takes a tokenized format string and applies it to a variant to produce a formatted output string.


Formats a variant containing numbers into a string form.


Formats a variant containing percentages into a string form.


Returns a string containing the localized month name.


Parses the actual format string into a series of tokens which can be used to format variants using VarFormatFromTokens.


Returns a string containing the localized name of the weekday.




© 2018 Microsoft