共用方式為


formatDateShort

傳回字串,表示格式化後的 datetime 值。 結果模式是以文化為基礎。 在美國,它表示為 MM/DD/YYYY

語法

context.formatting.formatDateShort(value, includeTime);

適用於

模型導向和畫布應用程式

參數

參數名稱 類型 為必填項目 Description
value Date Yes 要格式化的 Value Date。
包括時間 boolean Yes 是否以格式化值顯示時間。

傳回值

類型: string

格式化
Power Apps 元件架構 API 參考
Power Apps 元件架構概觀