傳回格式化字串,代表格式化後的日期時間值。
語法
context.formatting.formatUserDateTimeToUTC(userDateTime, behavior);
適用於
模型導向和畫布應用程式
參數
| 參數名稱 | 類型 | 為必填項目 | Description |
|---|---|---|---|
| userDateTime | Date |
Yes | 要格式化的日期。 |
| 行為 | DateTimeFieldBehavior |
否 | 要格式化的日期時間物件的行為。 |
傳回值
類型: string
傳回格式化字串,代表格式化後的日期時間值。
context.formatting.formatUserDateTimeToUTC(userDateTime, behavior);
模型導向和畫布應用程式
| 參數名稱 | 類型 | 為必填項目 | Description |
|---|---|---|---|
| userDateTime | Date |
Yes | 要格式化的日期。 |
| 行為 | DateTimeFieldBehavior |
否 | 要格式化的日期時間物件的行為。 |
類型: string