Last updated 3 years ago
Was this helpful?
注意:如果星期幾出現英文,記得到「檔案 > 試算表設定」中更改語言。
- 文中雖然介紹要用 WEEKDAY 函數,但只要直接對日期使用文中介紹的「格式 > 數值 > 其他格式 > 更多日期和時間格式」就可以了。
- 今年:YEAR(TODAY())
Google Help ⟩
/** * 將 0 ~ 6 轉為 "星期一" ~ "星期日" * 用 =weekdayName(WEEKDAY(date, 3)) 來轉換 * @customfuction */ function weekdayName(n) { const a = ["一", "二", "三", "四", "五", "六", "日"]; return '星期' + a[n]; }