Percentage.From
Syntax
Percentage.From(value as any, optional culture as nullable text) as nullable number
About
Returns a percentage
value from the given value
. If the given value
is null
, Percentage.From returns null
. If the given value
is text
with a trailing percent symbol, then the converted decimal number will be returned. Otherwise, the value will be converted to a number
using Number.From. An optional culture
may also be provided (for example, "en-US").
Example 1
Get the percentage
value of "12.3%"
.
Usage
Percentage.From("12.3%")
Output
0.123
Phản hồi
https://aka.ms/ContentUserFeedback.
Sắp ra mắt: Trong năm 2024, chúng tôi sẽ dần gỡ bỏ Sự cố với GitHub dưới dạng cơ chế phản hồi cho nội dung và thay thế bằng hệ thống phản hồi mới. Để biết thêm thông tin, hãy xem:Gửi và xem ý kiến phản hồi dành cho