Editar

Partilhar via


Formatting

Provides properties and methods to work with formatting.

Available for

Model-driven and canvas apps

Methods

Method Description
formatCurrency Returns a formatted string that represents the currency value after being formatted.
formatDateAsFilterStringInUTC Returns a formatted string that represents a date in YYYY-MM-DD standard UTC format. Results pattern is based on standard UTC format.
formatDateLong Returns a formatted string that represents a date in the long form. Results pattern is based on the culture. In USA it's "Abbreviated Day of week, Month dd, yyyy".
formatDateShort Returns a string represents the datetime value after being formatted. Result pattern is based on culture. In USA it is represented as MM/DD/YYYY.
formatDateLongAbbreviated Returns a formatted string that represents a date in the long form using abbreviation. Results pattern is based on culture. In USA it's "Abbreviated Day of week, Month dd, yyyy".
formatDateYearMonth Returns a formatted string that represents a date in the year month format.
formatDecimal Returns a formatted string that represents the decimal value after being formatted.
formatInteger Returns a formatted string represents a given integer value.
formatLanguage Returns a formatted string that represents a given language
formatUserDateTimeToUTC Returns a formatted string that represents the datetime value after being formatted.
formatUserInput Returns formatter user input based on the passed in attribute type. If type is not recognized, returns the input itself.
formatUTCDateTimeToUserDate Returns a date that represents the UTC value after being formatted.
formatTime Returns a formatted string that represents the datetime value after being formatted.
getWeekOfYear Gets the ISO week number of the year for a given date. Range is from 1-53.
parseDateFromInput Returns parsed string as date.

Example

To learn more about how to implement formatting methods, see Formatting API component

Power Apps component framework API reference
Power Apps component framework overview

g