DateTimeRenderOption
透過集合功能整理內容
你可以依據偏好儲存及分類內容。
列舉 |
SERIAL_NUMBER |
指示日期、時間、日期時間和時間長度欄位以「序號」格式輸出為雙精度,這類格式由 Lotus 1-2-3 廣為使用。值的整數部分 (小數點左側) 會從 1899 年 12 月 30 日開始計算天數。小數部分 (小數點右側) 會將時間計算為一天的一部分。舉例來說,1900 年 1 月 1 日中午的時間為 2.5,其中 2 是因為 1900 年 1 月 1 日是 1899 年 12 月 30 日後的 2 天,而 0.5 是因為中午是半天。1900 年 2 月 1 日下午 3 點的時間碼為 33.625。這會正確將 1900 年視為非閏年。 |
FORMATTED_STRING |
指示日期、時間、日期時間和時間長度欄位以指定數字格式 (取決於試算表語言代碼) 輸出字串。 |
除非另有註明,否則本頁面中的內容是採用創用 CC 姓名標示 4.0 授權,程式碼範例則為阿帕契 2.0 授權。詳情請參閱《Google Developers 網站政策》。Java 是 Oracle 和/或其關聯企業的註冊商標。
上次更新時間:2025-03-21 (世界標準時間)。
[null,null,["上次更新時間:2025-03-21 (世界標準時間)。"],[],[],null,["# DateTimeRenderOption\n\nDetermines how dates should be rendered in the output.\n\n| Enums ||\n|--------------------|------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| `SERIAL_NUMBER` | Instructs date, time, datetime, and duration fields to be output as doubles in \"serial number\" format, as popularized by Lotus 1-2-3. The whole number portion of the value (left of the decimal) counts the days since December 30th 1899. The fractional portion (right of the decimal) counts the time as a fraction of the day. For example, January 1st 1900 at noon would be 2.5, 2 because it's 2 days after December 30th 1899, and .5 because noon is half a day. February 1st 1900 at 3pm would be 33.625. This correctly treats the year 1900 as not a leap year. |\n| `FORMATTED_STRING` | Instructs date, time, datetime, and duration fields to be output as strings in their given number format (which depends on the spreadsheet locale). |"]]